system.js 511 B

1234567891011121314151617181920
  1. 'use strict';
  2. /**
  3. * @param {Egg.Application} app - egg application
  4. */
  5. module.exports = app => {
  6. const prefix = '/api/servicezhwl';
  7. const { router, controller } = app;
  8. router.get(`${prefix}/dictionary/tree`, controller.system.dictionary.tree);
  9. router.resources(
  10. 'dictionary',
  11. `${prefix}/dictionary`,
  12. controller.system.dictionary
  13. ); // index、create、show、destroy
  14. router.post(
  15. 'dictionary',
  16. `${prefix}/dictionary/update/:id`,
  17. controller.system.dictionary.update
  18. );
  19. };