refactor: organize imports and enhance formatting across backend files
Some checks failed
Backend Tests / test (push) Successful in 9m38s
Lint / lint (push) Failing after 4m59s

Optimized import order, applied consistent formatting, and improved readability in various modules, including `contents`, `media`, and `auth` services.
This commit is contained in:
Mathis HERRIOT
2026-01-08 15:33:55 +01:00
parent 6254c136d1
commit cc2823db7d
8 changed files with 39 additions and 25 deletions

View File

@@ -1,3 +1,4 @@
import { CacheInterceptor, CacheTTL } from "@nestjs/cache-manager";
import {
Body,
Controller,
@@ -5,6 +6,7 @@ import {
Delete,
Get,
Header,
NotFoundException,
Param,
ParseBoolPipe,
ParseIntPipe,
@@ -15,9 +17,7 @@ import {
UploadedFile,
UseGuards,
UseInterceptors,
NotFoundException,
} from "@nestjs/common";
import { CacheInterceptor, CacheTTL } from "@nestjs/cache-manager";
import { FileInterceptor } from "@nestjs/platform-express";
import type { Request, Response } from "express";
import { AuthGuard } from "../auth/guards/auth.guard";
@@ -130,9 +130,10 @@ export class ContentsController {
}
const userAgent = req.headers["user-agent"] || "";
const isBot = /bot|googlebot|crawler|spider|robot|crawling|facebookexternalhit|twitterbot/i.test(
userAgent,
);
const isBot =
/bot|googlebot|crawler|spider|robot|crawling|facebookexternalhit|twitterbot/i.test(
userAgent,
);
if (isBot) {
const imageUrl = this.contentsService.getFileUrl(content.storageKey);