File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
backend/src/api/controllers Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -214,10 +214,6 @@ export async function addResult(
214214 const completedEvent = req . body . result ;
215215 completedEvent . uid = uid ;
216216
217- if ( user . suspicious && completedEvent . testDuration <= 120 ) {
218- await addImportantLog ( "suspicious_user_result" , completedEvent , uid ) ;
219- }
220-
221217 if ( isTestTooShort ( completedEvent ) ) {
222218 const status = MonkeyStatusCodes . TEST_TOO_SHORT ;
223219 throw new MonkeyError ( status . code , status . message ) ;
@@ -284,6 +280,10 @@ export async function addResult(
284280 } ;
285281 }
286282
283+ if ( user . suspicious && completedEvent . testDuration <= 120 ) {
284+ await addImportantLog ( "suspicious_user_result" , completedEvent , uid ) ;
285+ }
286+
287287 if ( anticheatImplemented ( ) ) {
288288 if (
289289 ! validateResult (
@@ -536,6 +536,13 @@ export async function addResult(
536536 } ,
537537 dailyLeaderboardsConfig
538538 ) ;
539+ if (
540+ dailyLeaderboardRank >= 1 &&
541+ dailyLeaderboardRank <= 10 &&
542+ completedEvent . testDuration <= 120
543+ ) {
544+ await addLog ( "daily_leaderboard_top_10_result" , completedEvent , uid ) ;
545+ }
539546 }
540547
541548 const streak = await UserDAL . updateStreak ( uid , completedEvent . timestamp ) ;
You can’t perform that action at this time.
0 commit comments