CoreID/app/routing/routers/api/v1/message.routes.js
2020-08-12 21:27:51 -05:00

28 lines
719 B
JavaScript

const message_routes = {
prefix: '/api/v1/message',
middleware: [
'auth:APIRoute',
],
get: {
'/banners': [
['middleware::api:Permission', { check: 'v1:message:banners:get' }],
'controller::api:v1:Message.get_banners',
],
},
post: {
'/banners/read/:banner_id': [
['middleware::api:Permission', { check: 'v1:message:banners:update' }],
'controller::api:v1:Message.read_banner',
],
'/banners': [
['middleware::api:Permission', { check: 'v1:message:banners:create' }],
'controller::api:v1:Message.create_banner',
],
},
}
module.exports = exports = message_routes