fix(auth): small issues with login process

This commit is contained in:
Maieul BOYER 2025-09-08 14:52:47 +02:00
parent 4f8ebc7dd9
commit c4b1bb2f65
3 changed files with 5 additions and 4 deletions

View file

@ -104,7 +104,7 @@ export const UserImpl: Omit<IUserDb, keyof Database> = {
if (!isNullish(otp))
return otp;
let otpGen = new Otp();
const res: SqliteReturn = this.prepare("UPDATE OR IGNORE user SET otp = @otp WHERE id = @id RETURNING otp")
const res: any = this.prepare("UPDATE OR IGNORE user SET otp = @otp WHERE id = @id RETURNING otp")
.get({ id, otp: otpGen.secret });
return res?.otp;
},