Skip to content

Commit

Permalink
backendでmisskey-jsをインポートしている箇所の調整
Browse files Browse the repository at this point in the history
  • Loading branch information
adzukimame committed Dec 7, 2024
1 parent 4857558 commit cc31609
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions packages/backend/src/server/api/SigninApiService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import { Inject, Injectable } from '@nestjs/common';
import bcrypt from 'bcryptjs';
import { IsNull } from 'typeorm';
import * as Misskey from 'misskey-js';
import { DI } from '@/di-symbols.js';
import type {
MiMeta,
Expand All @@ -26,6 +25,7 @@ import { CaptchaService } from '@/core/CaptchaService.js';
import { FastifyReplyError } from '@/misc/fastify-reply-error.js';
import { RateLimiterService } from './RateLimiterService.js';
import { SigninService } from './SigninService.js';
import type { SigninFlowResponse as MisskeyApiSigninFlowResponse } from 'misskey-js/entities.js';
import type { AuthenticationResponseJSON } from '@simplewebauthn/types';
import type { FastifyReply, FastifyRequest } from 'fastify';

Expand Down Expand Up @@ -140,12 +140,12 @@ export class SigninApiService {
return {
finished: false,
next: 'password',
} satisfies Misskey.entities.SigninFlowResponse;
} satisfies MisskeyApiSigninFlowResponse;
} else {
return {
finished: false,
next: 'captcha',
} satisfies Misskey.entities.SigninFlowResponse;
} satisfies MisskeyApiSigninFlowResponse;
}
}

Expand Down Expand Up @@ -258,7 +258,7 @@ export class SigninApiService {
finished: false,
next: 'passkey',
authRequest,
} satisfies Misskey.entities.SigninFlowResponse;
} satisfies MisskeyApiSigninFlowResponse;
} else {
if (!same || !profile.twoFactorEnabled) {
return await fail(403, {
Expand All @@ -269,7 +269,7 @@ export class SigninApiService {
return {
finished: false,
next: 'totp',
} satisfies Misskey.entities.SigninFlowResponse;
} satisfies MisskeyApiSigninFlowResponse;
}
}
// never get here
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/server/api/SigninService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
*/

import { Inject, Injectable } from '@nestjs/common';
import * as Misskey from 'misskey-js';
import { DI } from '@/di-symbols.js';
import type { SigninsRepository } from '@/models/_.js';
import { IdService } from '@/core/IdService.js';
import type { MiLocalUser } from '@/models/User.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { SigninEntityService } from '@/core/entities/SigninEntityService.js';
import { bindThis } from '@/decorators.js';
import type { SigninFlowResponse as MisskeyApiSigninFlowResponse } from 'misskey-js/entities.js';
import type { FastifyRequest, FastifyReply } from 'fastify';

@Injectable()
Expand Down Expand Up @@ -47,7 +47,7 @@ export class SigninService {
finished: true,
id: user.id,
i: user.token!,
} satisfies Misskey.entities.SigninFlowResponse;
} satisfies MisskeyApiSigninFlowResponse;
}
}

2 changes: 1 addition & 1 deletion packages/backend/src/server/api/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/

import { permissions } from 'misskey-js';
import type { permissions } from 'misskey-js';
import type { KeyOf, Schema } from '@/misc/json-schema.js';

import * as ep___admin_meta from './endpoints/admin/meta.js';
Expand Down

0 comments on commit cc31609

Please sign in to comment.