Skip to content

Commit a40c863

Browse files
committed
Improved NEWACTION() template.
1 parent 192d455 commit a40c863

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

app.bundle

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

public/js/editor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1836,7 +1836,7 @@ SNIPPETS.push({ type: 'js', search: 'PUBLISH', text: '<b>PUBLISH</b>', code: 'PU
18361836
SNIPPETS.push({ type: 'js', search: 'SUBSCRIBE', text: '<b>SUBSCRIBE</b>', code: 'SUBSCRIBE(\'\', model, true);', ch: 12 });
18371837
SNIPPETS.push({ type: 'js', search: 'CALL', text: '<b>CALL</b>', code: 'CALL(\' --> exec\').params({}).query({}).promise($);', ch: 7, priority: 1 });
18381838
SNIPPETS.push({ type: 'js', search: 'API', text: '<b>API</b>', code: 'API(\'\', \'schema\', {}).controller($).promise($);', ch: 6, priority: 1 });
1839-
SNIPPETS.push({ type: 'js', search: 'NEWACTION', text: '<b>NEWACTION</b>', code: 'NEWACTION(\'\', {\n\t{0}name: \'\',\n\t{0}input: \'\',\n\t{0}query: \'\',\n\t{0}params: \'\',\n\t{0}// output: \'success:Boolean\',\n\t{0}action: async function($, model) {\n\t{0}\n\t{0}}\n});', ch: 12 });
1839+
SNIPPETS.push({ type: 'js', search: 'NEWACTION', text: '<b>NEWACTION</b>', code: 'NEWACTION(\'\', {\n\t{0}name: \'\',\n\t{0}input: \'\',\n\t{0}route: \'+API ?\',\n\t{0}query: \'\',\n\t{0}params: \'\',\n\t{0}permissions: \'admin\',\n\t{0}// output: \'success:Boolean\',\n\t{0}action: async function($, model) {\n\t{0}\n\t{0}}\n});', ch: 12 });
18401840
SNIPPETS.push({ type: 'js', search: 'NEWSCHEMA', text: '<b>NEWSCHEMA</b> (v5)', code: 'NEWSCHEMA(\'{1}\', \'\');', ch: 12 });
18411841
SNIPPETS.push({ type: 'js', search: 'NEWSCHEMA', text: '<b>NEWSCHEMA</b> (v4)', code: 'NEWSCHEMA(\'{1}\', function(schema) {\n\t{0}schema.define(\'key\', String, true);\n{0}});', ch: 12 });
18421842
SNIPPETS.push({ type: 'js', search: 'NEWAPI', text: '<b>NEWAPI</b>', code: 'NEWAPI(\'\', function(opt, next) {\n\t{0}RESTBuilder.API(\'https://yourtotalapp.com/api/\', opt.schema, opt.data).strict().callback(next);\n{0}});', ch: 9 });

0 commit comments

Comments
 (0)