summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2024-09-07 02:38:01 +0900
committerGitHub <noreply@github.com>2024-09-07 02:38:01 +0900
commit0d0cd738f85b662d57687e6d7ef198993cc5d322 (patch)
tree5afd36c5aecc20bf0a6b56d68672a405e8fe69ff /packages
parentfix(frontend): instance infoページで不必要なapiリクエストが飛... (diff)
downloadmisskey-0d0cd738f85b662d57687e6d7ef198993cc5d322.tar.gz
misskey-0d0cd738f85b662d57687e6d7ef198993cc5d322.tar.bz2
misskey-0d0cd738f85b662d57687e6d7ef198993cc5d322.zip
refactor(misskey-js): warnを除去 (#14520)
Diffstat (limited to 'packages')
-rw-r--r--packages/misskey-js/src/api.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/misskey-js/src/api.ts b/packages/misskey-js/src/api.ts
index 659a29a221..ed1282957f 100644
--- a/packages/misskey-js/src/api.ts
+++ b/packages/misskey-js/src/api.ts
@@ -67,10 +67,12 @@ export class APIClient {
): Promise<SwitchCaseResponseType<E, P>> {
return new Promise((resolve, reject) => {
let mediaType = 'application/json';
+ // (autogenがバグったときのため、念の為nullチェックも行う)
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (this.assertSpecialEpReqType(endpoint) && endpointReqTypes[endpoint] != null) {
mediaType = endpointReqTypes[endpoint];
}
-
+
let payload: FormData | string = '{}';
if (mediaType === 'application/json') {