From 1c1496afbc8aefd0a93b67d11434b49dfb62cf96 Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 22 Sep 2022 14:50:48 -0400 Subject: [PATCH] Change free chapter to use historical rep --- src/routes/getUserInfo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/getUserInfo.ts b/src/routes/getUserInfo.ts index 38c171d..c0b1955 100644 --- a/src/routes/getUserInfo.ts +++ b/src/routes/getUserInfo.ts @@ -118,7 +118,7 @@ async function getPermissions(userID: HashedUserID): Promise { return await oneOf([isUserVIP(userID), - (async () => (await getReputation(userID)) > 0)(), + (async () => !!(await db.prepare("get", `SELECT "timeSubmitted" FROM "sponsorTimes" WHERE "reputation" > 0 AND "timeSubmitted" < 1663872563000 AND "userID" = ? LIMIT 1`, [userID], { useReplica: true })))(), (async () => !!(await db.prepare("get", `SELECT "timeSubmitted" FROM "sponsorTimes" WHERE "timeSubmitted" < 1590969600000 AND "userID" = ? LIMIT 1`, [userID], { useReplica: true })))() ]); }