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,7 @@
import { readFile, unlink, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { Readable } from "node:stream";
import {
BadRequestException,
Injectable,
@@ -7,10 +11,6 @@ import {
import { ConfigService } from "@nestjs/config";
import * as NodeClam from "clamscan";
import ffmpeg from "fluent-ffmpeg";
import { readFile, unlink, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { Readable } from "node:stream";
import sharp from "sharp";
import { v4 as uuidv4 } from "uuid";
import type {
@@ -19,7 +19,9 @@ import type {
} from "./interfaces/media.interface";
interface ClamScanner {
scanStream(stream: Readable): Promise<{ isInfected: boolean; viruses: string[] }>;
scanStream(
stream: Readable,
): Promise<{ isInfected: boolean; viruses: string[] }>;
}
@Injectable()
@@ -34,7 +36,7 @@ export class MediaService {
private async initClamScan() {
try {
// @ts-ignore
// @ts-expect-error
const scanner = await new NodeClam().init({
clamdscan: {
host: this.configService.get<string>("CLAMAV_HOST", "localhost"),