diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-04-17 19:37:32 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-04-17 19:37:32 +0900 |
| commit | 611e4f34dcb90666f2bc3da699dc965e30f7cba6 (patch) | |
| tree | 4a37539090b4c90ee4dfe5b08d8aae0682678032 /src/server/api/endpoints/i/2fa | |
| parent | Merge branch 'develop' (diff) | |
| parent | 11.1.5 (diff) | |
| download | misskey-611e4f34dcb90666f2bc3da699dc965e30f7cba6.tar.gz misskey-611e4f34dcb90666f2bc3da699dc965e30f7cba6.tar.bz2 misskey-611e4f34dcb90666f2bc3da699dc965e30f7cba6.zip | |
Merge branch 'develop'
Diffstat (limited to 'src/server/api/endpoints/i/2fa')
| -rw-r--r-- | src/server/api/endpoints/i/2fa/done.ts | 2 | ||||
| -rw-r--r-- | src/server/api/endpoints/i/2fa/register.ts | 2 | ||||
| -rw-r--r-- | src/server/api/endpoints/i/2fa/unregister.ts | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/server/api/endpoints/i/2fa/done.ts b/src/server/api/endpoints/i/2fa/done.ts index e23678dcbb..c134e1b226 100644 --- a/src/server/api/endpoints/i/2fa/done.ts +++ b/src/server/api/endpoints/i/2fa/done.ts @@ -19,7 +19,7 @@ export const meta = { export default define(meta, async (ps, user) => { const token = ps.token.replace(/\s/g, ''); - const profile = await UserProfiles.findOne({ userId: user.id }).then(ensure); + const profile = await UserProfiles.findOne(user.id).then(ensure); if (profile.twoFactorTempSecret == null) { throw new Error('二段階認証の設定が開始されていません'); diff --git a/src/server/api/endpoints/i/2fa/register.ts b/src/server/api/endpoints/i/2fa/register.ts index 76d79b3a49..bd46b7c68c 100644 --- a/src/server/api/endpoints/i/2fa/register.ts +++ b/src/server/api/endpoints/i/2fa/register.ts @@ -20,7 +20,7 @@ export const meta = { }; export default define(meta, async (ps, user) => { - const profile = await UserProfiles.findOne({ userId: user.id }).then(ensure); + const profile = await UserProfiles.findOne(user.id).then(ensure); // Compare password const same = await bcrypt.compare(ps.password, profile.password!); diff --git a/src/server/api/endpoints/i/2fa/unregister.ts b/src/server/api/endpoints/i/2fa/unregister.ts index 9c7857e7ef..99483143cc 100644 --- a/src/server/api/endpoints/i/2fa/unregister.ts +++ b/src/server/api/endpoints/i/2fa/unregister.ts @@ -17,7 +17,7 @@ export const meta = { }; export default define(meta, async (ps, user) => { - const profile = await UserProfiles.findOne({ userId: user.id }).then(ensure); + const profile = await UserProfiles.findOne(user.id).then(ensure); // Compare password const same = await bcrypt.compare(ps.password, profile.password!); |