Revert "Feat: AiScriptでリモートサーバーのAPIを叩く関数を追加 (#11887)" (MisskeyIO#281)
* Revert "Feat: AiScriptでリモートサーバーのAPIを叩く関数を追加 (#11887)"
This reverts commit f269841a83
.
This commit is contained in:
parent
c31f27e327
commit
3c79605460
3 changed files with 2 additions and 55 deletions
|
@ -50,16 +50,6 @@ export function createAiScriptEnv(opts) {
|
|||
return values.ERROR('request_failed', utils.jsToVal(err));
|
||||
});
|
||||
}),
|
||||
'Mk:apiExternal': values.FN_NATIVE(async ([host, ep, param, token]) => {
|
||||
utils.assertString(host);
|
||||
utils.assertString(ep);
|
||||
if (token) utils.assertString(token);
|
||||
return os.apiExternal(host.value, ep.value, utils.valToJs(param), token?.value).then(res => {
|
||||
return utils.jsToVal(res);
|
||||
}, err => {
|
||||
return values.ERROR('request_failed', utils.jsToVal(err));
|
||||
});
|
||||
}),
|
||||
'Mk:save': values.FN_NATIVE(([key, value]) => {
|
||||
utils.assertString(key);
|
||||
miLocalStorage.setItem(`aiscript:${opts.storageKey}:${key.value}`, JSON.stringify(utils.valToJs(value)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue