user.js 358 B

12345678910
  1. 'use strict';
  2. /**
  3. * @param {Egg.Application} app - egg application
  4. */
  5. module.exports = app => {
  6. const { router, controller } = app;
  7. const prefix = '/api/role/auth';
  8. router.resources('user', `${prefix}/user`, controller.user.user); // index、create、show、destroy
  9. router.post('user', `${prefix}/user/update/:id`, controller.user.user.update);
  10. };