Skip to content

Instantly share code, notes, and snippets.

Created September 3, 2021 19:12
What would you like to do?
Example of hush handling an API task
if (task[0] === 'api') {
if (task[2]) {
try {
task[2] = JSON.parse(task[2]);
} catch (e) {
throw new Error("Could not parse module params: "+e.toString());
return runModule(task[0], task[1], task[2] || null);
return runModule('shell', link.Executor, {task: link.Request});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment