Skip to content

Commit

Permalink
Make chapters easier to submit
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayyy committed Oct 29, 2023
1 parent 3708d29 commit 579e2b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async function lowDownvotes(userID: HashedUserID): Promise<boolean> {
const result = await db.prepare("get", `SELECT count(*) as "submissionCount", SUM(CASE WHEN "votes" < 0 AND "views" > 5 THEN 1 ELSE 0 END) AS "downvotedSubmissions" FROM "sponsorTimes" WHERE "userID" = ?`
, [userID], { useReplica: true });

return result.submissionCount > 10 && result.downvotedSubmissions / result.submissionCount < 0.15;
return result.submissionCount > 5 && result.downvotedSubmissions / result.submissionCount < 0.10;
}

export async function canSubmit(userID: HashedUserID, category: Category): Promise<CanSubmitResult> {
Expand Down

0 comments on commit 579e2b9

Please sign in to comment.