router.js 595 B

1234567891011121314
  1. 'use strict';
  2. /**
  3. * @param {Egg.Application} app - egg application
  4. */
  5. module.exports = app => {
  6. const { router, controller } = app;
  7. router.get('/', controller.home.index);
  8. router.post('mission', '/api/mission/progress', controller.mission.progress);
  9. router.get('mission', '/api/mission/count', controller.mission.count);
  10. router.post('mission', '/api/mission/start/:id', controller.mission.start);
  11. router.resources('mission', '/api/mission', controller.mission); // index、create、show、destroy
  12. router.post('mission', '/api/mission/update/:id', controller.mission.update);
  13. };