2022-10-21 15:28:37 +01:00
|
|
|
'use strict';
|
|
|
|
|
2022-11-22 11:04:45 +00:00
|
|
|
const { ACTIONS } = require('../constants');
|
|
|
|
|
2022-10-21 15:28:37 +01:00
|
|
|
module.exports = {
|
|
|
|
type: 'admin',
|
|
|
|
routes: [
|
|
|
|
{
|
|
|
|
method: 'GET',
|
|
|
|
path: '/configuration',
|
2022-11-22 11:04:45 +00:00
|
|
|
handler: 'view-configuration.findViewConfiguration',
|
2022-10-21 15:28:37 +01:00
|
|
|
config: {
|
|
|
|
policies: ['admin::isAuthenticatedAdmin'],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
method: 'PUT',
|
|
|
|
path: '/configuration',
|
|
|
|
handler: 'view-configuration.updateViewConfiguration',
|
|
|
|
config: {
|
|
|
|
policies: [
|
|
|
|
'admin::isAuthenticatedAdmin',
|
|
|
|
{
|
|
|
|
name: 'admin::hasPermissions',
|
|
|
|
config: {
|
2022-11-22 11:04:45 +00:00
|
|
|
actions: [ACTIONS.configureView],
|
2022-10-21 15:28:37 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|