2020-11-11 02:57:43 +00:00
|
|
|
module.exports = exports = {
|
|
|
|
|
|
|
|
prefix: '/api/v1/code',
|
|
|
|
|
2020-11-11 18:23:31 +00:00
|
|
|
middleware: [],
|
2020-11-11 02:57:43 +00:00
|
|
|
|
|
|
|
get: {
|
|
|
|
// Get the code ref node config for the specified code editor
|
2020-11-11 19:54:20 +00:00
|
|
|
'/:PageId/:NodeId/get/:CodiumId': [
|
|
|
|
'middleware::auth:ApiRoute',
|
|
|
|
['middleware::api:DataInjection', { access_level: 'view' }],
|
|
|
|
'controller::api:v1:FormCode.get_config',
|
|
|
|
],
|
2020-11-11 02:57:43 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
post: {
|
|
|
|
// Create a new code ref config
|
2020-11-11 19:54:20 +00:00
|
|
|
'/:PageId/:NodeId/create': [
|
|
|
|
'middleware::auth:ApiRoute',
|
|
|
|
['middleware::api:DataInjection', { access_level: 'update' }],
|
|
|
|
'controller::api:v1:FormCode.create_new',
|
|
|
|
],
|
2020-11-11 02:57:43 +00:00
|
|
|
|
|
|
|
// Set the data for the specified code ref
|
2020-11-11 19:54:20 +00:00
|
|
|
'/:PageId/:NodeId/set/:CodiumId': [
|
|
|
|
'middleware::auth:ApiRoute',
|
|
|
|
['middleware::api:DataInjection', { access_level: 'update' }],
|
|
|
|
'controller::api:v1:FormCode.set_values',
|
|
|
|
],
|
2020-11-11 02:57:43 +00:00
|
|
|
|
|
|
|
// delete the specified code ref
|
2020-11-11 19:54:20 +00:00
|
|
|
'/:PageId/:NodeId/delete/:CodiumId': [
|
|
|
|
'middleware::auth:ApiRoute',
|
|
|
|
['middleware::api:DataInjection', { access_level: 'update' }],
|
|
|
|
'controller::api:v1:FormCode.drop_code',
|
|
|
|
],
|
2020-11-11 02:57:43 +00:00
|
|
|
},
|
|
|
|
}
|