From b3d59e2aaed584e3e662f63c0d2e29e5d0f2285f Mon Sep 17 00:00:00 2001 From: tamaina Date: Mon, 9 Jan 2023 15:28:31 +0000 Subject: [PATCH] fix --- packages/frontend/src/scripts/api.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/scripts/api.ts b/packages/frontend/src/scripts/api.ts index 4e7db4fd7b..a9ae821d27 100644 --- a/packages/frontend/src/scripts/api.ts +++ b/packages/frontend/src/scripts/api.ts @@ -1,4 +1,5 @@ import * as Misskey from 'misskey-js'; +import { ref } from 'vue'; import { apiUrl, url } from '@/config'; import { $i } from '@/account'; export const pendingApiRequestsCount = ref(0); @@ -14,7 +15,7 @@ export const api = ((endpoint: string, data: Record = {}, token?: s pendingApiRequestsCount.value--; }; - const promise = new Promise((resolve, reject) => { + const promise = new Promise((resolve, reject) => { // Append a credential if ($i) (data as any).i = $i.token; if (token !== undefined) (data as any).i = token;