You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
712 B

3 days ago
const express = require("express")
const router = express.Router()
const {
getExpressServices,
addExpressServices,
updateExpressServices
} = require("../services/expressService")
const {
formatResponse
} = require("../utils/tools")
3 days ago
router.get("/", async function (req, res, next) {
const data = await getExpressServices()
res.send(formatResponse(0, "", data))
})
router.post("/", async function (req, res, next) {
const data = await addExpressServices(req.body)
res.send(formatResponse(0, "", data))
})
router.put("/", async function (req, res, next) {
const data = await updateExpressServices(req.body)
res.send(formatResponse(0, "", data))
})
3 days ago
module.exports = router