mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-12-26 18:09:40 +08:00
updated log
This commit is contained in:
parent
a08be965f3
commit
82bfc5956e
1 changed files with 3 additions and 1 deletions
|
|
@ -777,13 +777,15 @@ export async function recordAutoBanEvent(
|
|||
const updateObj: Partial<MonkeyTypes.User> = {
|
||||
autoBanTimestamps: recentAutoBanTimestamps,
|
||||
};
|
||||
let banningUser = false;
|
||||
if (recentAutoBanTimestamps.length > maxCount) {
|
||||
updateObj.banned = true;
|
||||
banningUser = true;
|
||||
ret = true;
|
||||
}
|
||||
|
||||
await getUsersCollection().updateOne({ uid }, { $set: updateObj });
|
||||
Logger.logToDb("user_auto_banned", { autoBanTimestamps }, uid);
|
||||
Logger.logToDb("user_auto_banned", { autoBanTimestamps, banningUser }, uid);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue