1
0
Fork 1
mirror of https://example.com synced 2024-11-22 10:36:38 +09:00

fix(backend): update security keys available entry

This commit is contained in:
TrojanerHD 2024-02-24 02:14:03 +01:00 committed by naskya
parent 7ceaa9c090
commit 4687b21d79
Signed by: naskya
GPG key ID: 712D413B3A9FED5C
2 changed files with 4 additions and 1 deletions

View file

@ -144,6 +144,8 @@ export default define(meta, paramDef, async (ps, user) => {
}),
);
UserProfiles.update(user.id, { securityKeysAvailable: true });
return {
id: credentialIdString,
name: ps.name,

View file

@ -47,8 +47,9 @@ export default define(meta, paramDef, async (ps, user) => {
});
if (keyCount === 0) {
await UserProfiles.update(me.id, {
await UserProfiles.update(user.id, {
usePasswordLessLogin: false,
securityKeysAvailable: false,
});
}