From e62832ab2cba151b9d373df3799901bced51ba10 Mon Sep 17 00:00:00 2001 From: ikoenigsknecht Date: Mon, 11 Mar 2024 14:36:40 -0400 Subject: [PATCH] Add comments --- .../src/nest/storage/userProfile/userProfile.store.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/backend/src/nest/storage/userProfile/userProfile.store.ts b/packages/backend/src/nest/storage/userProfile/userProfile.store.ts index b6bf19d195..36b2591a9b 100644 --- a/packages/backend/src/nest/storage/userProfile/userProfile.store.ts +++ b/packages/backend/src/nest/storage/userProfile/userProfile.store.ts @@ -72,6 +72,13 @@ export const isGif = (buffer: Uint8Array): boolean => { return false } +/** + * Validate a profile photo in a user profile + * + * @param photoString Base64 string representing the photo file that was uploaded + * @param pubKey Public key string for logging purposes + * @returns True if photo is valid and false if not + */ export const validatePhoto = (photoString: string, pubKey: string): boolean => { // validate that we have the photo as a base64 string if (typeof photoString !== 'string') {