This commit is contained in:
chaosBreaking
2019-10-03 00:22:23 +08:00
parent ef66042e49
commit 538b73e015
9 changed files with 131 additions and 16 deletions

View File

@@ -0,0 +1,22 @@
'use strict';
const indexRoute = '/admin/api';
const controller = require('./admin.controller');
const services = [
{
url: '/in',
method: 'GET',
controller: controller.signin
},
{
url: '/actions',
method: 'POST',
controller: controller.getUserActions
}
];
module.exports = services.map(service => {
// 可以在此处对要导出的服务map进行统一处理
service.url = indexRoute + service.url;
return service;
});