28 lines
719 B
JavaScript
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
|