fix(routes/api/recovery_codes): convert number into string

fixes type error, as usedStatus is expecting string[] and "indexOf" returns a number
This commit is contained in:
Panagiotis Papadopoulos 2025-04-09 09:21:20 +02:00
parent eae68064e5
commit 05917fd815

View File

@ -47,7 +47,7 @@ function getUsedRecoveryCodes() {
recoveryCodes.forEach((recoveryKey: string) => {
if (dateRegex.test(recoveryKey)) usedStatus.push(recoveryKey);
else usedStatus.push(recoveryCodes.indexOf(recoveryKey));
else usedStatus.push(String(recoveryCodes.indexOf(recoveryKey)));
});
return {