2021-02-04 15:19:04 +00:00
|
|
|
module.exports = exports = {
|
|
|
|
|
|
|
|
prefix: '/api/v1/file-box',
|
|
|
|
|
|
|
|
middleware: [],
|
|
|
|
|
|
|
|
get: {
|
2021-02-04 21:54:48 +00:00
|
|
|
'/:PageId/:NodeId/:FileBoxId': [
|
2021-02-04 15:19:04 +00:00
|
|
|
'middleware::auth:ApiRoute',
|
|
|
|
['middleware::api:DataInjection', { access_level: 'view' }],
|
|
|
|
'controller::api:v1:FileBox.get_box',
|
|
|
|
],
|
2021-02-05 02:41:03 +00:00
|
|
|
'/:PageId/:NodeId/:FileBoxId/history': [
|
|
|
|
'middleware::auth:ApiRoute',
|
|
|
|
['middleware::api:DataInjection', { access_level: 'view' }],
|
|
|
|
'controller::api:v1:FileBox.get_box_history_path',
|
|
|
|
],
|
2021-02-04 21:54:48 +00:00
|
|
|
'/:PageId/:NodeId/:FileBoxId/files': [
|
2021-02-04 15:19:04 +00:00
|
|
|
'middleware::auth:ApiRoute',
|
|
|
|
['middleware::api:DataInjection', { access_level: 'view' }],
|
|
|
|
'controller::api:v1:FileBox.get_files',
|
|
|
|
],
|
2021-02-04 21:54:48 +00:00
|
|
|
'/:PageId/:NodeId/:FileBoxId/files/:FileBoxFileId': [
|
2021-02-04 18:57:11 +00:00
|
|
|
'middleware::auth:ApiRoute',
|
|
|
|
['middleware::api:DataInjection', { access_level: 'view' }],
|
|
|
|
'controller::api:v1:FileBox.download_file',
|
|
|
|
],
|
2021-02-04 21:54:48 +00:00
|
|
|
'/:PageId/:NodeId/:FileBoxId/children': [
|
2021-02-04 18:57:11 +00:00
|
|
|
'middleware::auth:ApiRoute',
|
|
|
|
['middleware::api:DataInjection', { access_level: 'view' }],
|
|
|
|
'controller::api:v1:FileBox.get_children',
|
|
|
|
],
|
2021-02-04 15:19:04 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
post: {
|
2021-02-04 21:54:48 +00:00
|
|
|
'/:PageId/:NodeId/create': [
|
2021-02-04 15:19:04 +00:00
|
|
|
'middleware::auth:ApiRoute',
|
|
|
|
['middleware::api:DataInjection', { access_level: 'update' }],
|
|
|
|
'controller::api:v1:FileBox.create',
|
|
|
|
],
|
2021-02-04 21:54:48 +00:00
|
|
|
'/:PageId/:NodeId/:FileBoxId': [
|
2021-02-04 15:19:04 +00:00
|
|
|
'middleware::auth:ApiRoute',
|
|
|
|
['middleware::api:DataInjection', { access_level: 'update' }],
|
|
|
|
'controller::api:v1:FileBox.update',
|
|
|
|
],
|
2021-02-04 21:54:48 +00:00
|
|
|
'/:PageId/:NodeId/:FileBoxId/files': [
|
2021-02-04 15:19:04 +00:00
|
|
|
'middleware::auth:ApiRoute',
|
|
|
|
['middleware::api:DataInjection', { access_level: 'update' }],
|
|
|
|
['middleware::upload:UploadFile', { tag: 'file_box_file' }],
|
|
|
|
'controller::api:v1:FileBox.upload_files',
|
|
|
|
],
|
2021-02-04 21:54:48 +00:00
|
|
|
'/:PageId/:NodeId/:FileBoxId/files/:FileBoxFileId': [
|
2021-02-04 15:19:04 +00:00
|
|
|
'middleware::auth:ApiRoute',
|
|
|
|
['middleware::api:DataInjection', { access_level: 'update' }],
|
|
|
|
'controller::api:v1:FileBox.update_file',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
|
|
|
delete: {
|
2021-02-04 21:54:48 +00:00
|
|
|
'/:PageId/:NodeId/:FileBoxId': [
|
2021-02-04 15:19:04 +00:00
|
|
|
'middleware::auth:ApiRoute',
|
|
|
|
['middleware::api:DataInjection', { access_level: 'update' }],
|
|
|
|
'controller::api:v1:FileBox.delete_box',
|
|
|
|
],
|
2021-02-04 21:54:48 +00:00
|
|
|
'/:PageId/:NodeId/:FileBoxId/files/:FileBoxFileId': [
|
2021-02-04 15:19:04 +00:00
|
|
|
'middleware::auth:ApiRoute',
|
|
|
|
['middleware::api:DataInjection', { access_level: 'update' }],
|
|
|
|
'controller::api:v1:FileBox.delete_file',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}
|