diff --git a/packages/frontend/src/scripts/api.ts b/packages/frontend/src/scripts/api.ts index 78be5c8954..d1c9d79864 100644 --- a/packages/frontend/src/scripts/api.ts +++ b/packages/frontend/src/scripts/api.ts @@ -51,7 +51,7 @@ export function api(hostUrl: string, endpoint: E, data: P = {} as any, token?: string | null | undefined, signal?: AbortSignal): Promise { +export async function apiExternal(hostUrl: string, endpoint: E, data: P = {} as any, token?: string | null | undefined, signal?: AbortSignal): Promise { if (!/^https?:\/\//.test(hostUrl)) throw new Error('invalid host name'); if (endpoint.includes('://')) throw new Error('invalid endpoint'); const knownUrls = (await api('federation/instances', { blocked: false })).map(v => v.host);