This commit is contained in:
chaosBreaking
2019-08-31 14:59:13 +08:00
commit dc5423d356
65 changed files with 3813 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
const indexRoute = '/user';
const controller = require('./user.controller');
const services = [
{
url: '/info',
method: 'GET',
controller: controller.getUserInfo
},
{
url: '/chpasswd',
method: 'POST',
controller: controller.changePwd
},
{
url: '/chphone',
method: 'POST',
controller: controller.changePhone
},
{
url: '/group',
method: 'GET',
controller: controller.getGroup
},
];
module.exports = services.map(service => {
// 可以在此处对要导出的服务map进行统一处理
service.url = indexRoute + service.url;
return service;
});