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

28 lines
719 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-08-13 02:27:51 +00:00
'/banners': [
['middleware::api:Permission', { check: 'v1:message:banners:create' }],
'controller::api:v1:Message.create_banner',
],
2020-05-04 01:16:54 +00:00
},
}
module.exports = exports = message_routes