bypass fetch?
This commit is contained in:
parent
5696781a8c
commit
0564aeff6d
|
@ -10,7 +10,7 @@ import { getAcct } from '@/misc/acct';
|
||||||
import { getAccountFromId } from '@client/scripts/get-account-from-id';
|
import { getAccountFromId } from '@client/scripts/get-account-from-id';
|
||||||
import { appendLoginId } from '@client/scripts/login-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']) {
|
export async function api<E extends keyof Misskey.Endpoints>(endpoint: E, userId: string, options?: Misskey.Endpoints[E]['req']) {
|
||||||
const account = await getAccountFromId(userId);
|
const account = await getAccountFromId(userId);
|
||||||
|
|
Loading…
Reference in a new issue