Skip to content
Snippets Groups Projects
Commit 9244efe3 authored by syuilo's avatar syuilo
Browse files

fix(client): Mk:api関数にトークンを渡せない問題

parent 4ea60d36
No related branches found
No related tags found
No related merge requests found
......@@ -23,9 +23,10 @@ export function createAiScriptEnv(vm, opts) {
return confirm.canceled ? values.FALSE : values.TRUE;
}),
'Mk:api': values.FN_NATIVE(async ([ep, param, token]) => {
if (token) utils.assertString(token);
apiRequests++;
if (apiRequests > 16) return values.NULL;
const res = await vm.$root.api(ep.value, utils.valToJs(param), token || null);
const res = await vm.$root.api(ep.value, utils.valToJs(param), token ? token.value : null);
return utils.jsToVal(res);
}),
'Mk:save': values.FN_NATIVE(([key, value]) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment