This commit is contained in:
chaosBreaking
2019-10-12 11:50:57 +08:00
parent 5601223085
commit 0bb94f6bc7
7 changed files with 261 additions and 7 deletions

View File

@@ -0,0 +1,27 @@
'use strict';
const indexRoute = '/vreq';
const controller = require('./vreq.controller');
const services = [
{
url: '/handle',
method: 'POST',
controller: controller.reqHandle
},
{
url: '/list',
method: 'GET',
controller: controller.getReqList
},
{
url: '/detail',
method: 'GET',
controller: controller.getReqDetail
},
];
module.exports = services.map(service => {
// 可以在此处对要导出的服务map进行统一处理
service.url = indexRoute + service.url;
return service;
});