'use strict'; /** * @param {Egg.Application} app - egg application */ module.exports = app => { const { router, controller } = app; // 类型 router.post('/api/code/type/create', controller.type.create); router.post('/api/code/type/update', controller.type.update); router.delete('/api/code/type/delete/:id', controller.type.delete); router.get('/api/code/type/query', controller.type.query); // 字典项 router.post('/api/code/dictionary/create', controller.dictionary.create); router.post('/api/code/dictionary/update', controller.dictionary.update); router.delete('/api/code/dictionary/delete/:id', controller.dictionary.delete); router.get('/api/code/dictionary/query', controller.dictionary.query); };