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
