Corrige la déclaration de la méthode getChecksum

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.
This commit is contained in:
Mathis H (Avnyr) 2024-08-21 16:23:28 +02:00
parent f0a950f16a
commit 53c7938304
No known key found for this signature in database
GPG Key ID: FF69BF8BF95CDD58

View File

@ -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();
}