achieve_apply.js 904 B

12345678910111213141516
  1. 'use strict';
  2. module.exports = app => {
  3. const { router, controller } = app;
  4. const profix = '/api/achieve/';
  5. const vision = 'v0';
  6. const target = 'achieveApply';
  7. router.get(target, `${profix}${vision}/${target}/remind/:user_id`, controller[target].menuRemind);
  8. router.get(target, `${profix}${vision}/${target}/get`, controller[target].getOne);
  9. router.post(target, `${profix}${vision}/${target}/:id/research`, controller[target].researchCreate);
  10. router.post(target, `${profix}${vision}/${target}/:id/research/:research_id`, controller[target].researchUpdate);
  11. router.delete(target, `${profix}${vision}/${target}/:id/research/:research_id`, controller[target].researchDelete);
  12. router.resources(target, `${profix}${vision}/${target}`, controller[target]); // index、create、show、destroy
  13. router.post(target, `${profix}${vision}/${target}/update/:id`, controller[target].update);
  14. };