diff options
| author | RyotaK <49341894+Ry0taK@users.noreply.github.com> | 2023-03-08 16:32:13 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-08 16:32:13 +0900 |
| commit | 116dd097bda66196d69d81cf42c8e0bb7f32b141 (patch) | |
| tree | 2e557613e0f1526dce4c4a9e6b33fe0e6870e59d /packages/frontend/src/scripts/api.ts | |
| parent | feat: Reaction acceptance (#10256) (diff) | |
| download | sharkey-116dd097bda66196d69d81cf42c8e0bb7f32b141.tar.gz sharkey-116dd097bda66196d69d81cf42c8e0bb7f32b141.tar.bz2 sharkey-116dd097bda66196d69d81cf42c8e0bb7f32b141.zip | |
fix: 登録フォームにおける競合状態を修正 (#10267)
* fix: 登録フォームにおける競合状態を修正
* エラーを修正
Diffstat (limited to 'packages/frontend/src/scripts/api.ts')
| -rw-r--r-- | packages/frontend/src/scripts/api.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/frontend/src/scripts/api.ts b/packages/frontend/src/scripts/api.ts index 5f34f5333e..97081d170f 100644 --- a/packages/frontend/src/scripts/api.ts +++ b/packages/frontend/src/scripts/api.ts @@ -5,7 +5,7 @@ import { $i } from '@/account'; export const pendingApiRequestsCount = ref(0); // Implements Misskey.api.ApiClient.request -export function api<E extends keyof Endpoints, P extends Endpoints[E]['req']>(endpoint: E, data: P = {} as any, token?: string | null | undefined): Promise<Endpoints[E]['res']> { +export function api<E extends keyof Endpoints, P extends Endpoints[E]['req']>(endpoint: E, data: P = {} as any, token?: string | null | undefined, signal?: AbortSignal): Promise<Endpoints[E]['res']> { pendingApiRequestsCount.value++; const onFinally = () => { @@ -26,6 +26,7 @@ export function api<E extends keyof Endpoints, P extends Endpoints[E]['req']>(en headers: { 'Content-Type': 'application/json', }, + signal, }).then(async (res) => { const body = res.status === 204 ? null : await res.json(); |