From 75dca8816479a09c1ab152320117c8c659ee3408 Mon Sep 17 00:00:00 2001 From: Mathis HERRIOT <197931332+0x485254@users.noreply.github.com> Date: Mon, 9 Feb 2026 09:54:23 +0100 Subject: [PATCH] style(app): reformat import statements and improve logging structure - Simplified and condensed import declarations in `app.module.ts`. - Enhanced error logging format in `crawler-detection.middleware.ts` for better readability. --- backend/src/app.module.ts | 7 +------ .../src/common/middlewares/crawler-detection.middleware.ts | 4 +++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/backend/src/app.module.ts b/backend/src/app.module.ts index 44e0942..6a689ca 100644 --- a/backend/src/app.module.ts +++ b/backend/src/app.module.ts @@ -1,10 +1,5 @@ import { CacheModule } from "@nestjs/cache-manager"; -import { - Logger, - MiddlewareConsumer, - Module, - NestModule, -} from "@nestjs/common"; +import { Logger, MiddlewareConsumer, Module, NestModule } from "@nestjs/common"; import { ConfigModule, ConfigService } from "@nestjs/config"; import { ScheduleModule } from "@nestjs/schedule"; import { ThrottlerModule } from "@nestjs/throttler"; diff --git a/backend/src/common/middlewares/crawler-detection.middleware.ts b/backend/src/common/middlewares/crawler-detection.middleware.ts index ad706f0..8987b61 100644 --- a/backend/src/common/middlewares/crawler-detection.middleware.ts +++ b/backend/src/common/middlewares/crawler-detection.middleware.ts @@ -59,7 +59,9 @@ export class CrawlerDetectionMiddleware implements NestMiddleware { return; } } catch (error) { - this.logger.error(`Error checking ban status for IP ${ip}: ${error.message}`); + this.logger.error( + `Error checking ban status for IP ${ip}: ${error.message}`, + ); // On continue même en cas d'erreur Redis pour ne pas bloquer les utilisateurs légitimes }