version.js 449 B

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