From 05917fd815fdc6c252ebb9abd648a63084387344 Mon Sep 17 00:00:00 2001 From: Panagiotis Papadopoulos Date: Wed, 9 Apr 2025 09:21:20 +0200 Subject: [PATCH] fix(routes/api/recovery_codes): convert number into string fixes type error, as usedStatus is expecting string[] and "indexOf" returns a number --- src/routes/api/recovery_codes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/api/recovery_codes.ts b/src/routes/api/recovery_codes.ts index 848820981..a98e1e38c 100644 --- a/src/routes/api/recovery_codes.ts +++ b/src/routes/api/recovery_codes.ts @@ -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 {