mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 17:03:49 +01:00
fix(client): Mk:api関数にトークンを渡せない問題
This commit is contained in:
parent
c8a336034d
commit
0cc6421328
@ -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]) => {
|
||||
|
Loading…
Reference in New Issue
Block a user