1234567891011 |
- 'use strict';
- module.exports = app => {
- const { router, controller, config } = app;
- const profix = `/api${config.appName ? `/${config.appName}` : ''}`;
- const index = 'system';
- const target = 'news';
- router.resources(target, `${profix}/${index}/${target}`, controller[index][target]); // index、create、show、destroy
- router.post(target, `${profix}/${index}/${target}/update/:id`, controller[index][target].update);
- };
|