const system_routes = {
    prefix: '/api/v1/system',

    middleware: [
        'auth:APIRoute'
    ],

    get: {
        '/announcements': [
            ['middleware::api:Permission', { check: 'v1:system:announcements:list' }],
            'controller::api:v1:System.get_announcements',
        ],
        '/announcements/:id': [
            ['middleware::api:Permission', { check: 'v1:system:announcements:get' }],
            'controller::api:v1:System.get_announcement',
        ],
    },

    post: {
        '/announcements': [
            ['middleware::api:Permission', { check: 'v1:system:announcements:create'}],
            'controller::api:v1:System.create_announcement',
        ],
    },

    delete: {
        '/announcements/:id': [
            ['middleware::api:Permission', { check: 'v1:system:announcements:delete' }],
            'controller::api:v1:System.delete_announcement',
        ],
    },
}

module.exports = exports = system_routes
