You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.3 KiB

module.exports = exports = {
prefix: '/api/v1/page',
middleware: [
'auth:ApiRoute',
],
get: {
// Get the data for the specified page
'/:PageId': ['controller::api:v1:Page.get_page'],
// Get the available versions of the given page
'/:PageId/versions': ['controller::api:v1:Page.get_page_versions'],
// Get the nodes present on the specified page
'/:PageId/nodes': ['controller::api:v1:Page.get_nodes'],
},
post: {
// Save the data for the specified page
'/:PageId/save': ['controller::api:v1:Page.save_page'],
// Revert the page to a previous version
'/:PageId/versions/revert': ['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_one': ['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 a new page as a child of the specified page
'/create-child': ['controller::api:v1:Page.create_child'],
// Delete the specified page
'/delete/:PageId': ['controller::api:v1:Page.delete_page'],
},
}