Skip to content

Commit

Permalink
fix: minor typo
Browse files Browse the repository at this point in the history
  • Loading branch information
McPizza0 committed Nov 1, 2024
1 parent 9d30fb3 commit cb52568
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/services/secret-sharing/secret-sharing-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,11 @@ export const secretSharingServiceFactory = ({
? await secretSharingDAL.findById(sharedSecretId)
: await secretSharingDAL.findOne({ identifier: sharedSecretId });

const deletedSharedSecret = await secretSharingDAL.deleteById(sharedSecretId);

if (sharedSecret.orgId && sharedSecret.orgId !== orgId)
throw new ForbiddenRequestError({ message: "User does not have permission to delete shared secret" });

const deletedSharedSecret = await secretSharingDAL.deleteById(sharedSecretId);

return deletedSharedSecret;
};

Expand Down

0 comments on commit cb52568

Please # to comment.