Resolve #1669
This commit is contained in:
parent
d355f3f77c
commit
7ed3448e13
19 changed files with 152 additions and 216 deletions
|
|
@ -35,7 +35,7 @@ export default define(meta, async (ps, user) => {
|
|||
throw new Error('not verified');
|
||||
}
|
||||
|
||||
await UserProfiles.update({ userId: user.id }, {
|
||||
await UserProfiles.update(user.id, {
|
||||
twoFactorSecret: profile.twoFactorTempSecret,
|
||||
twoFactorEnabled: true
|
||||
});
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export default define(meta, async (ps, user) => {
|
|||
length: 32
|
||||
});
|
||||
|
||||
await UserProfiles.update({ userId: user.id }, {
|
||||
await UserProfiles.update(user.id, {
|
||||
twoFactorTempSecret: secret.base32
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export default define(meta, async (ps, user) => {
|
|||
throw new Error('incorrect password');
|
||||
}
|
||||
|
||||
await UserProfiles.update({ userId: user.id }, {
|
||||
await UserProfiles.update(user.id, {
|
||||
twoFactorSecret: null,
|
||||
twoFactorEnabled: false
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue