fix: don't attempt user reset token cleaning if uid is not a number

This commit is contained in:
Julian Lam
2024-06-07 16:18:24 -04:00
parent d442251f22
commit 8d790964be

View File

@@ -154,6 +154,9 @@ UserReset.clean = async function () {
UserReset.cleanByUid = async function (uid) {
const tokensToClean = [];
uid = parseInt(uid, 10);
if (!uid) {
return;
}
await batch.processSortedSet('reset:issueDate', async (tokens) => {
const results = await db.getObjectFields('reset:uid', tokens);