expressSandbox/routes/Codes/index.js

16 lines
403 B
JavaScript
Raw Normal View History

2024-12-09 10:00:39 +00:00
const { getCodeListByTypeId } = require('./service')
const { sendResponse } = require('../../utils')
const express = require('express')
const router = express.Router()
router.get('/list/:typeId', async (req, res) => {
const { typeId } = req.params
const gCodeList = await getCodeListByTypeId(typeId)
sendResponse({ res, status: 200, message: '', data: gCodeList })
})
module.exports = router