bypass fetch?

This commit is contained in:
tamaina 2021-09-21 03:37:32 +09:00
parent 5696781a8c
commit 0564aeff6d

View file

@ -10,7 +10,7 @@ import { getAcct } from '@/misc/acct';
import { getAccountFromId } from '@client/scripts/get-account-from-id';
import { appendLoginId } from '@client/scripts/login-id';
export const cli = new Misskey.api.APIClient({ origin });
export const cli = new Misskey.api.APIClient({ origin, fetch: (...args) => fetch(...args) });
export async function api<E extends keyof Misskey.Endpoints>(endpoint: E, userId: string, options?: Misskey.Endpoints[E]['req']) {
const account = await getAccountFromId(userId);