achieve_expert.js 666 B

1234567891011121314
  1. 'use strict';
  2. module.exports = app => {
  3. const { router, controller } = app;
  4. const profix = '/api/achieve/';
  5. const vision = 'v0';
  6. const target = 'achieveExpert';
  7. router.get(target, `${profix}${vision}/${target}/getExpertList`, controller[target].getExpertList);
  8. router.post(target, `${profix}${vision}/${target}/login`, controller[target].login);
  9. router.post(target, `${profix}${vision}/${target}/restore/:id`, controller[target].restore);
  10. router.resources(target, `${profix}${vision}/${target}`, controller[target]); // index、create、show、destroy
  11. router.post(target, `${profix}${vision}/${target}/update/:id`, controller[target].update);
  12. };