@@ -252,7 +252,9 @@ class DefaultUserActionLimitService implements UserActionLimitService {
252252 required Engagement engagement,
253253 }) async {
254254 _log.info ('Checking engagement creation limits for user ${user .id }.' );
255- final remoteConfig = await _remoteConfigRepository.read (id: _remoteConfigId);
255+ final remoteConfig = await _remoteConfigRepository.read (
256+ id: _remoteConfigId,
257+ );
256258 final limits = remoteConfig.user.limits;
257259
258260 // --- 1. Check Reaction Limit ---
@@ -264,7 +266,9 @@ class DefaultUserActionLimitService implements UserActionLimitService {
264266 }
265267
266268 // Count all engagements in the last 24 hours for the reaction limit.
267- final twentyFourHoursAgo = DateTime .now ().subtract (const Duration (hours: 24 ));
269+ final twentyFourHoursAgo = DateTime .now ().subtract (
270+ const Duration (hours: 24 ),
271+ );
268272 final reactionCount = await _engagementRepository.count (
269273 filter: {
270274 'userId' : user.id,
@@ -317,7 +321,9 @@ class DefaultUserActionLimitService implements UserActionLimitService {
317321 @override
318322 Future <void > checkReportCreationLimit ({required User user}) async {
319323 _log.info ('Checking report creation limits for user ${user .id }.' );
320- final remoteConfig = await _remoteConfigRepository.read (id: _remoteConfigId);
324+ final remoteConfig = await _remoteConfigRepository.read (
325+ id: _remoteConfigId,
326+ );
321327 final limits = remoteConfig.user.limits;
322328
323329 final reportsLimit = limits.reportsPerDay[user.appRole];
@@ -327,7 +333,9 @@ class DefaultUserActionLimitService implements UserActionLimitService {
327333 );
328334 }
329335
330- final twentyFourHoursAgo = DateTime .now ().subtract (const Duration (hours: 24 ));
336+ final twentyFourHoursAgo = DateTime .now ().subtract (
337+ const Duration (hours: 24 ),
338+ );
331339 final reportCount = await _reportRepository.count (
332340 filter: {
333341 'reporterUserId' : user.id,
@@ -339,7 +347,9 @@ class DefaultUserActionLimitService implements UserActionLimitService {
339347 _log.warning (
340348 'User ${user .id } exceeded reports per day limit: $reportsLimit .' ,
341349 );
342- throw const ForbiddenException ('You have reached your daily limit for reports.' );
350+ throw const ForbiddenException (
351+ 'You have reached your daily limit for reports.' ,
352+ );
343353 }
344354
345355 _log.info ('Report creation limit checks passed for user ${user .id }.' );
0 commit comments