Skip to content

Commit 0c7817e

Browse files
authored
Merge pull request #484 from sandwitchhx/staging
removed modular level declaration
2 parents b753581 + 068cf7b commit 0c7817e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/lib/services/report.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ interface ReportedFieldInput {
2020
}
2121

2222
export async function reportTag(paperId: string, body: ReportTagBody) {
23-
await connectToDatabase();
24-
const MAX_REPORTS_PER_PAPER = 5;
23+
await connectToDatabase();
2524
const count = await TagReport.countDocuments({ paperId });
2625

27-
if (count >= MAX_REPORTS_PER_PAPER) {
26+
if (count >= 5) {
2827
throw new CustomError("Received many reports; we are currently working on it.", 429)
2928
}
3029
const reportedFields: ReportedFieldInput[] = Array.isArray(body.reportedFields)

0 commit comments

Comments
 (0)