-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: AiScriptでリモートサーバーのAPIを叩く関数を追加 #11887
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #11887 +/- ##
===========================================
- Coverage 78.82% 78.76% -0.07%
===========================================
Files 929 928 -1
Lines 98646 98623 -23
Branches 7852 7849 -3
===========================================
- Hits 77762 77680 -82
- Misses 20884 20943 +59
☔ View full report in Codecov by Sentry. |
const fullUrl = (host.value.slice(-1) === '/' ? host.value.slice(0, -1) : host.value) | ||
+ '/' + (ep.value.slice(0, 1) === '/' ? ep.value.slice(1) : ep.value); | ||
if (token) utils.assertString(token); | ||
return os.api(fullUrl, utils.valToJs(param), token?.value).then(res => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
token?.value ?? null にしないと自分のトークンがセットされそうな気がする
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修正しました。
os.apiについても他のサーバーのAPIを叩く想定ではなかった気がするからそこから変えた方が安全かも |
os.apiからos.apiExternalに分けました。 |
https://github.com/misskey-dev/misskey/pull/11887/files#diff-b05ec85108e30f0df14a119036c103460d0991730b9166985326af8e95641122R67-R68 |
@Sayamame-beans 忘れていました、ありがとうございます。 |
この部分、 |
Mk:apiの場合はos.api関数にundefinedを渡すと自分のトークンがセットされるのでnullに変える必要がありますが、 |
なるほど。失礼いたしました… |
/deploy sha=33f651354d8513873a5ff98348339f9ae8ed6a04 |
👍🏻 |
This reverts commit f269841.
* Revert "Feat: AiScriptでリモートサーバーのAPIを叩く関数を追加 (misskey-dev#11887)" This reverts commit f269841.
…skeyIO#281) * Revert "Feat: AiScriptでリモートサーバーのAPIを叩く関数を追加 (misskey-dev#11887)" This reverts commit f269841.
Revert "Feat: AiScriptでリモートサーバーのAPIを叩く関数を追加 (misskey-dev#11887)" (MisskeyIO#281)
What
リモートサーバー用Mk:apiのMk:apiExternalを追加します。
Why
#11886
Additional info (optional)
Checklist