merge: all upstream changes
This commit is contained in:
commit
f8f128b347
170 changed files with 4490 additions and 2218 deletions
|
@ -14,9 +14,9 @@
|
|||
"misskey-js": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/parser": "6.7.3",
|
||||
"@typescript-eslint/parser": "6.7.5",
|
||||
"@typescript/lib-webworker": "npm:@types/serviceworker@0.0.67",
|
||||
"eslint": "8.50.0",
|
||||
"eslint": "8.51.0",
|
||||
"eslint-plugin-import": "2.28.1",
|
||||
"typescript": "5.2.2"
|
||||
},
|
||||
|
|
|
@ -15,7 +15,7 @@ import { getUrlWithLoginId } from '@/scripts/login-id.js';
|
|||
export const cli = new Misskey.api.APIClient({ origin, fetch: (...args): Promise<Response> => fetch(...args) });
|
||||
|
||||
export async function api<E extends keyof Misskey.Endpoints, O extends Misskey.Endpoints[E]['req']>(endpoint: E, userId?: string, options?: O): Promise<void | ReturnType<typeof cli.request<E, O>>> {
|
||||
let account: { token: string; id: string } | void;
|
||||
let account: { token: string; id: string } | void = undefined;
|
||||
|
||||
if (userId) {
|
||||
account = await getAccountFromId(userId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue