From 8479c406a516d2a8aeb6271785457c43ed815b4b Mon Sep 17 00:00:00 2001 From: lemmyMwaura Date: Thu, 8 Aug 2024 10:06:55 +0300 Subject: [PATCH] fix: fix type assersion error --- backend/src/services/secret-sharing/secret-sharing-service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/services/secret-sharing/secret-sharing-service.ts b/backend/src/services/secret-sharing/secret-sharing-service.ts index e7e6d4c16..6961a9e6d 100644 --- a/backend/src/services/secret-sharing/secret-sharing-service.ts +++ b/backend/src/services/secret-sharing/secret-sharing-service.ts @@ -221,7 +221,7 @@ export const secretSharingServiceFactory = ({ if (accessType === SecretSharingAccessType.Organization && orgId !== sharedSecret.orgId) throw new UnauthorizedError(); - // all secrets pass through here, meaning we check if its expired first and then check if it needs verification + // all secrets pass through here, meaning we check if its expired first and then check if it needs verification // or can be safely sent to the client. await checkIfSecretIsExpired(sharedSecret, sharedSecretId); @@ -267,7 +267,7 @@ export const secretSharingServiceFactory = ({ message: "Something went wrong" }); - const isMatch = await bcrypt.compare(password, sharedSecret.password as string); + const isMatch = await bcrypt.compare(password, sharedSecret.password); if (!isMatch) return undefined; // reduce the view count when the password matches (will be returned to the client).