Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kanarikanaru committed Nov 2, 2023
1 parent 9c5356e commit d6640a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/misskey-js/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ export class APIClient {
IsCaseMatched<E, P, 8> extends true ? GetCaseResult<E, P, 8> :
IsCaseMatched<E, P, 9> extends true ? GetCaseResult<E, P, 9> :
Endpoints[E]['res']['$switch']['$default']
: Endpoints[E]['res']>
{
: Endpoints[E]['res']> {
const promise = new Promise((resolve, reject) => {
this.fetch(`${this.origin}/api/${endpoint}`, {
method: 'POST',
Expand Down
2 changes: 1 addition & 1 deletion packages/sw/src/scripts/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d6640a0

Please sign in to comment.