mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
changes for script execution (parameters etc.)
This commit is contained in:
@@ -29,12 +29,12 @@ const server = (function() {
|
||||
return await call('DELETE', url);
|
||||
}
|
||||
|
||||
async function exec(script) {
|
||||
async function exec(script, params = []) {
|
||||
if (typeof script === "function") {
|
||||
script = script.toString();
|
||||
}
|
||||
|
||||
return await post('script/exec', { script: script });
|
||||
return await post('script/exec', { script: script, params: params });
|
||||
}
|
||||
|
||||
let i = 1;
|
||||
|
||||
Reference in New Issue
Block a user