admin.js 482 B

123456789101112
  1. 'use strict';
  2. module.exports = app => {
  3. const { router, controller } = app;
  4. const profix = '/api/qiuguan/';
  5. const index = 'system';
  6. const target = 'admin';
  7. router.post(target, `${profix}${index}/${target}/login`, controller[index][target].login);
  8. router.resources(target, `${profix}${index}/${target}`, controller[index][target]); // index、create、show、destroy
  9. router.post(target, `${profix}${index}/${target}/update/:id`, controller[index][target].update);
  10. };