From 53c79383040a5584d5680895f390fa6887817142 Mon Sep 17 00:00:00 2001 From: Mathis Date: Wed, 21 Aug 2024 16:23:28 +0200 Subject: [PATCH] =?UTF-8?q?Corrige=20la=20d=C3=A9claration=20de=20la=20m?= =?UTF-8?q?=C3=A9thode=20getChecksum?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ajoute la spécification de retour pour la méthode getChecksum dans StorageService. Cela améliore la clarté et la sécurité du code en explicitant le type de retour attendu. --- apps/backend/src/app/storage/storage.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/backend/src/app/storage/storage.service.ts b/apps/backend/src/app/storage/storage.service.ts index 1ab28d3..f0f6382 100644 --- a/apps/backend/src/app/storage/storage.service.ts +++ b/apps/backend/src/app/storage/storage.service.ts @@ -31,7 +31,7 @@ export class StorageService { * @param {Buffer} file - The file for which the checksum is to be calculated. * @return {string} - The hexadecimal representation of the checksum. */ - private getChecksum(file: Buffer) { + private getChecksum(file: Buffer): string { return crypto.createHash('sha256').update(file).digest('hex').toLowerCase(); }