🐛 Forgot condition on resend code
This commit is contained in:
parent
af4f51eaab
commit
5a51fc63d0
@ -268,7 +268,7 @@ export default class CustomersService extends BaseService {
|
|||||||
|
|
||||||
// 2: Get last code sent
|
// 2: Get last code sent
|
||||||
const totpCodeToResend = customerHydrated.totpCodes?.find((totpCode) => {
|
const totpCodeToResend = customerHydrated.totpCodes?.find((totpCode) => {
|
||||||
return totpCode.uid && totpCodeUid;
|
return totpCode.uid === totpCodeUid && totpCode.expire_at && totpCode.expire_at.getTime() > now;
|
||||||
});
|
});
|
||||||
if (!totpCodeToResend) throw new TotpCodeExpiredError();
|
if (!totpCodeToResend) throw new TotpCodeExpiredError();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user