Split API into multiple files & setup public user permissions
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
4636521d50
commit
9df5f2d5f4
@ -1,40 +1,38 @@
|
||||
module.exports = exports = {
|
||||
prefix: '/api/v1/page',
|
||||
|
||||
middleware: [
|
||||
'auth:ApiRoute',
|
||||
],
|
||||
middleware: [],
|
||||
|
||||
get: {
|
||||
// Get the data for the specified page
|
||||
'/:PageId': ['controller::api:v1:Page.get_page'],
|
||||
'/:PageId': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.get_page'],
|
||||
|
||||
// Get the available versions of the given page
|
||||
'/:PageId/versions': ['controller::api:v1:Page.get_page_versions'],
|
||||
'/:PageId/versions': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.get_page_versions'],
|
||||
|
||||
// Get the nodes present on the specified page
|
||||
'/:PageId/nodes': ['controller::api:v1:Page.get_nodes'],
|
||||
'/:PageId/nodes': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.get_nodes'],
|
||||
},
|
||||
|
||||
post: {
|
||||
// Save the data for the specified page
|
||||
'/:PageId/save': ['controller::api:v1:Page.save_page'],
|
||||
'/:PageId/save': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.save_page'],
|
||||
|
||||
// Revert the page to a previous version
|
||||
'/:PageId/versions/revert': ['controller::api:v1:Page.revert_version'],
|
||||
'/:PageId/versions/revert': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.revert_version'],
|
||||
|
||||
// Save the node data for the specified page
|
||||
'/:PageId/nodes/save': ['controller::api:v1:Page.save_nodes'],
|
||||
'/:PageId/nodes/save': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.save_nodes'],
|
||||
|
||||
'/:PageId/nodes/save_one': ['controller::api:v1:Page.save_node_to_page'],
|
||||
'/:PageId/nodes/save_one': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.save_node_to_page'],
|
||||
|
||||
// Create a new page in the personal root
|
||||
'/create': ['controller::api:v1:Page.create_top_level'],
|
||||
'/create': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.create_top_level'],
|
||||
|
||||
// Create a new page as a child of the specified page
|
||||
'/create-child': ['controller::api:v1:Page.create_child'],
|
||||
'/create-child': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.create_child'],
|
||||
|
||||
// Delete the specified page
|
||||
'/delete/:PageId': ['controller::api:v1:Page.delete_page'],
|
||||
'/delete/:PageId': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.delete_page'],
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in new issue