mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-24 17:36:43 -06:00
fix(client): Mk:api関数にトークンを渡せない問題
This commit is contained in:
parent
4ea60d36e5
commit
9244efe351
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue