chore(upload)

This commit is contained in:
Jamie Howard 2022-11-22 11:04:45 +00:00
parent c486ec8d0f
commit 358e26ed18
2 changed files with 5 additions and 3 deletions

View File

@ -21,7 +21,7 @@ module.exports = {
ctx.body = { data }; ctx.body = { data };
}, },
async getViewConfiguration(ctx) { async findViewConfiguration(ctx) {
const data = await getService('upload').getConfiguration(); const data = await getService('upload').getConfiguration();
ctx.body = { data }; ctx.body = { data };

View File

@ -1,12 +1,14 @@
'use strict'; 'use strict';
const { ACTIONS } = require('../constants');
module.exports = { module.exports = {
type: 'admin', type: 'admin',
routes: [ routes: [
{ {
method: 'GET', method: 'GET',
path: '/configuration', path: '/configuration',
handler: 'view-configuration.getViewConfiguration', handler: 'view-configuration.findViewConfiguration',
config: { config: {
policies: ['admin::isAuthenticatedAdmin'], policies: ['admin::isAuthenticatedAdmin'],
}, },
@ -21,7 +23,7 @@ module.exports = {
{ {
name: 'admin::hasPermissions', name: 'admin::hasPermissions',
config: { config: {
actions: ['plugin::upload.configure-view'], actions: [ACTIONS.configureView],
}, },
}, },
], ],