We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b753581 + 068cf7b commit 0c7817eCopy full SHA for 0c7817e
src/lib/services/report.ts
@@ -20,11 +20,10 @@ interface ReportedFieldInput {
20
}
21
22
export async function reportTag(paperId: string, body: ReportTagBody) {
23
- await connectToDatabase();
24
- const MAX_REPORTS_PER_PAPER = 5;
+ await connectToDatabase();
25
const count = await TagReport.countDocuments({ paperId });
26
27
- if (count >= MAX_REPORTS_PER_PAPER) {
+ if (count >= 5) {
28
throw new CustomError("Received many reports; we are currently working on it.", 429)
29
30
const reportedFields: ReportedFieldInput[] = Array.isArray(body.reportedFields)
0 commit comments