67 lines
2.4 KiB
JavaScript
67 lines
2.4 KiB
JavaScript
module.exports = exports = {
|
|
|
|
prefix: '/api/v1/file-box',
|
|
|
|
middleware: [],
|
|
|
|
get: {
|
|
'/:PageId/:FileBoxId': [
|
|
'middleware::auth:ApiRoute',
|
|
['middleware::api:DataInjection', { access_level: 'view' }],
|
|
'controller::api:v1:FileBox.get_box',
|
|
],
|
|
'/:PageId/:FileBoxId/files': [
|
|
'middleware::auth:ApiRoute',
|
|
['middleware::api:DataInjection', { access_level: 'view' }],
|
|
'controller::api:v1:FileBox.get_files',
|
|
],
|
|
'/:PageId/:FileBoxId/files/:FileBoxFileId': [
|
|
'middleware::auth:ApiRoute',
|
|
['middleware::api:DataInjection', { access_level: 'view' }],
|
|
'controller::api:v1:FileBox.download_file',
|
|
],
|
|
'/:PageId/:FileBoxId/children': [
|
|
'middleware::auth:ApiRoute',
|
|
['middleware::api:DataInjection', { access_level: 'view' }],
|
|
'controller::api:v1:FileBox.get_children',
|
|
],
|
|
},
|
|
|
|
post: {
|
|
'/:PageId/create': [
|
|
'middleware::auth:ApiRoute',
|
|
['middleware::api:DataInjection', { access_level: 'update' }],
|
|
'controller::api:v1:FileBox.create',
|
|
],
|
|
'/:PageId/:FileBoxId': [
|
|
'middleware::auth:ApiRoute',
|
|
['middleware::api:DataInjection', { access_level: 'update' }],
|
|
'controller::api:v1:FileBox.update',
|
|
],
|
|
'/:PageId/:FileBoxId/files': [
|
|
'middleware::auth:ApiRoute',
|
|
['middleware::api:DataInjection', { access_level: 'update' }],
|
|
['middleware::upload:UploadFile', { tag: 'file_box_file' }],
|
|
'controller::api:v1:FileBox.upload_files',
|
|
],
|
|
'/:PageId/:FileBoxId/files/:FileBoxFileId': [
|
|
'middleware::auth:ApiRoute',
|
|
['middleware::api:DataInjection', { access_level: 'update' }],
|
|
'controller::api:v1:FileBox.update_file',
|
|
],
|
|
},
|
|
|
|
delete: {
|
|
'/:PageId/:FileBoxId': [
|
|
'middleware::auth:ApiRoute',
|
|
['middleware::api:DataInjection', { access_level: 'update' }],
|
|
'controller::api:v1:FileBox.delete_box',
|
|
],
|
|
'/:PageId/:FileBoxId/files/:FileBoxFileId': [
|
|
'middleware::auth:ApiRoute',
|
|
['middleware::api:DataInjection', { access_level: 'update' }],
|
|
'controller::api:v1:FileBox.delete_file',
|
|
],
|
|
},
|
|
}
|