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.
This commit is contained in:
Mathis HERRIOT
2026-02-09 09:54:23 +01:00
parent fe7683f5b1
commit 75dca88164
2 changed files with 4 additions and 7 deletions

View File

@@ -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";

View File

@@ -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
}