Fix reputation using wrong date

This commit is contained in:
Ajay
2023-02-04 18:22:19 -05:00
parent 7361c7056b
commit 280e6684af

View File

@@ -15,7 +15,7 @@ interface ReputationDBResult {
}
export async function getReputation(userID: UserID): Promise<number> {
const weekAgo = Date.now() - 1000 * 60 * 60 * 24 * 45; // 45 days ago
const weekAgo = Date.now() - 1000 * 60 * 60 * 24 * 7; // 45 days ago
const pastDate = Date.now() - 1000 * 60 * 60 * 24 * 45; // 45 days ago
// 1596240000000 is August 1st 2020, a little after auto upvote was disabled
const fetchFromDB = () => db.prepare("get",