const express = require("express") const router = express.Router() const { getExpressServices, addExpressServices, updateExpressServices } = require("../services/expressService") const { formatResponse } = require("../utils/tools") 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)) }) module.exports = router