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.

39 lines
1.2 KiB

module.exports = exports = {
prefix: '/api/v1/code',
middleware: [],
get: {
// Get the code ref node config for the specified code editor
'/:PageId/:NodeId/get/:CodiumId': [
'middleware::auth:ApiRoute',
['middleware::api:DataInjection', { access_level: 'view' }],
'controller::api:v1:FormCode.get_config',
],
},
post: {
// Create a new code ref config
'/:PageId/:NodeId/create': [
'middleware::auth:ApiRoute',
['middleware::api:DataInjection', { access_level: 'update' }],
'controller::api:v1:FormCode.create_new',
],
// Set the data for the specified code ref
'/:PageId/:NodeId/set/:CodiumId': [
'middleware::auth:ApiRoute',
['middleware::api:DataInjection', { access_level: 'update' }],
'controller::api:v1:FormCode.set_values',
],
// delete the specified code ref
'/:PageId/:NodeId/delete/:CodiumId': [
'middleware::auth:ApiRoute',
['middleware::api:DataInjection', { access_level: 'update' }],
'controller::api:v1:FormCode.drop_code',
],
},
}