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 = '/otcads';
const controller = require('./otcAds.controller');
const services = [
{
url: '/publish',
method: 'POST',
controller: controller.publishAd
},
{
url: '/revoke',
method: 'POST',
controller: controller.revokeAd
},
{
url: '/getAdList',
method: 'GET',
controller: controller.getAdList
},
{
url: '/getAdDetail',
method: 'GET',
controller: controller.getAdDetail
}
];
module.exports = services.map(service => {
// 可以在此处对要导出的服务map进行统一处理
service.url = indexRoute + service.url;
return service;
});