init
This commit is contained in:
30
src/modules/otcAds/otcAds.service.js
Normal file
30
src/modules/otcAds/otcAds.service.js
Normal 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;
|
||||
});
|
||||
Reference in New Issue
Block a user