1
0
mirror of https://github.com/Infisical/infisical.git synced 2025-03-31 22:09:57 +00:00

fix: fix type assersion error

This commit is contained in:
lemmyMwaura
2024-08-08 10:06:55 +03:00
parent 8e0b4254b1
commit 8479c406a5

@ -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).