2020-05-04 01:16:54 +00:00
|
|
|
const message_routes = {
|
|
|
|
prefix: '/api/v1/message',
|
|
|
|
|
|
|
|
middleware: [
|
2020-05-17 04:55:08 +00:00
|
|
|
'auth:APIRoute',
|
2020-05-04 01:16:54 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
get: {
|
2020-05-17 04:55:08 +00:00
|
|
|
'/banners': [
|
|
|
|
['middleware::api:Permission', { check: 'v1:message:banners:get' }],
|
|
|
|
'controller::api:v1:Message.get_banners',
|
|
|
|
],
|
2020-05-04 01:16:54 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
post: {
|
2020-05-17 04:55:08 +00:00
|
|
|
'/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
|