router.js 544 B

123456789101112131415
  1. 'use strict';
  2. /**
  3. * @param {Egg.Application} app - egg application
  4. */
  5. module.exports = app => {
  6. const { router, controller } = app;
  7. // 測試
  8. router.resources('test', '/api/servicezhwl/test', controller.test); // index、create、show、destroy
  9. router.post('test', '/api/servicezhwl/test/update/:id', controller.test.update);
  10. // 用户表
  11. router.resources('user', '/api/servicezhwl/user', controller.test); // index、create、show、destroy
  12. router.post('user', '/api/servicezhwl/user/update/:id', controller.test.update);
  13. };