garrettmills
9df5f2d5f4
All checks were successful
continuous-integration/drone/push Build is passing
39 lines
1.5 KiB
JavaScript
39 lines
1.5 KiB
JavaScript
module.exports = exports = {
|
|
prefix: '/api/v1/page',
|
|
|
|
middleware: [],
|
|
|
|
get: {
|
|
// Get the data for the specified page
|
|
'/:PageId': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.get_page'],
|
|
|
|
// Get the available versions of the given page
|
|
'/:PageId/versions': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.get_page_versions'],
|
|
|
|
// Get the nodes present on the specified page
|
|
'/:PageId/nodes': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.get_nodes'],
|
|
},
|
|
|
|
post: {
|
|
// Save the data for the specified page
|
|
'/:PageId/save': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.save_page'],
|
|
|
|
// Revert the page to a previous version
|
|
'/:PageId/versions/revert': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.revert_version'],
|
|
|
|
// Save the node data for the specified page
|
|
'/:PageId/nodes/save': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.save_nodes'],
|
|
|
|
'/:PageId/nodes/save_one': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.save_node_to_page'],
|
|
|
|
// Create a new page in the personal root
|
|
'/create': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.create_top_level'],
|
|
|
|
// Create a new page as a child of the specified page
|
|
'/create-child': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.create_child'],
|
|
|
|
// Delete the specified page
|
|
'/delete/:PageId': ['middleware::auth:ApiRoute', 'controller::api:v1:Page.delete_page'],
|
|
},
|
|
}
|