mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-04 04:51:16 +08:00
logging reports
This commit is contained in:
parent
ed4f109c56
commit
90660a6858
1 changed files with 5 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
const MonkeyError = require("../handlers/error");
|
||||
const { mongoDB } = require("../init/mongodb");
|
||||
const Logger = require("../handlers/logger");
|
||||
|
||||
const MAX_REPORTS = 1000;
|
||||
const CONTENT_REPORT_LIMIT = 5;
|
||||
|
@ -27,6 +28,10 @@ class ReportDAO {
|
|||
}
|
||||
|
||||
await mongoDB().collection("reports").insertOne(report);
|
||||
Logger.log("report_created", {
|
||||
type: report.type,
|
||||
details: report.details,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue