CoreID/app/routing/routers/api/v1/message.routes.js

24 lines
546 B
JavaScript
Raw Normal View History

2020-05-04 01:16:54 +00:00
const message_routes = {
prefix: '/api/v1/message',
middleware: [
'auth:APIRoute',
2020-05-04 01:16:54 +00:00
],
get: {
'/banners': [
['middleware::api:Permission', { check: 'v1:message:banners:get' }],
'controller::api:v1:Message.get_banners',
],
2020-05-04 01:16:54 +00:00
},
post: {
'/banners/read/:banner_id': [
['middleware::api:Permission', { check: 'v1:message:banners:update' }],
'controller::api:v1:Message.read_banner',
],
2020-05-04 01:16:54 +00:00
},
}
module.exports = exports = message_routes