39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
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',
|
|
],
|
|
},
|
|
}
|