We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05e3cb1 commit 65844a2Copy full SHA for 65844a2
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