mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-05 21:15:26 +08:00
parent
6c9eb9ec3a
commit
f0ec3d36ff
1 changed files with 4 additions and 0 deletions
|
@ -8,6 +8,10 @@ export async function createReport(
|
|||
maxReports: number,
|
||||
contentReportLimit: number
|
||||
): Promise<void> {
|
||||
if (report.type === "user" && report.contentId === report.uid) {
|
||||
throw new MonkeyError(400, "You cannot report yourself.");
|
||||
}
|
||||
|
||||
const reportsCount = await db
|
||||
.collection<MonkeyTypes.Report>(COLLECTION_NAME)
|
||||
.estimatedDocumentCount();
|
||||
|
|
Loading…
Add table
Reference in a new issue