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

@@ -20,8 +20,8 @@ import {
tags,
users,
} from "../database/schemas";
import { MediaService } from "../media/media.service";
import type { MediaProcessingResult } from "../media/interfaces/media.interface";
import { MediaService } from "../media/media.service";
import { S3Service } from "../s3/s3.service";
import { CreateContentDto } from "./dto/create-content.dto";
@@ -43,7 +43,12 @@ export class ContentsService {
async uploadAndProcess(
userId: string,
file: Express.Multer.File,
data: { title: string; type: "meme" | "gif"; categoryId?: string; tags?: string[] },
data: {
title: string;
type: "meme" | "gif";
categoryId?: string;
tags?: string[];
},
) {
// 0. Validation du format et de la taille
const allowedMimeTypes = [
@@ -304,7 +309,8 @@ export class ContentsService {
getFileUrl(storageKey: string): string {
const endpoint = this.configService.get("S3_ENDPOINT");
const port = this.configService.get("S3_PORT");
const protocol = this.configService.get("S3_USE_SSL") === true ? "https" : "http";
const protocol =
this.configService.get("S3_USE_SSL") === true ? "https" : "http";
const bucket = this.configService.get("S3_BUCKET_NAME");
if (endpoint === "localhost" || endpoint === "127.0.0.1") {