12345678910111213 |
- // 共用模块
- module.exports = app => {
- const { router, controller } = app;
- const ApiRouter = router.namespace('/api');
- ApiRouter.get('/version', controller.api.apiController.version);
- ApiRouter.post('/user/register', controller.api.userController.register);
- };
- // module.exports = app => {
- // const { router, controller } = app;
- // const ApiRouter = router.namespace('/api', app.middleware.Auth);
- // const UserApiRouter = ApiRouter.namespace('/user');
- // };
|