feat: resolved gcp auth revoke error

This commit is contained in:
=
2024-06-23 01:25:27 +05:30
parent b6cc17d62a
commit 084fc7c99e

View File

@@ -326,9 +326,9 @@ export const identityGcpAuthServiceFactory = ({
}: TRevokeGcpAuthDTO) => {
const identityMembershipOrg = await identityOrgMembershipDAL.findOne({ identityId });
if (!identityMembershipOrg) throw new BadRequestError({ message: "Failed to find identity" });
if (identityMembershipOrg.identity?.authMethod !== IdentityAuthMethod.AWS_AUTH)
if (identityMembershipOrg.identity?.authMethod !== IdentityAuthMethod.GCP_AUTH)
throw new BadRequestError({
message: "The identity does not have aws auth"
message: "The identity does not have gcp auth"
});
const { permission } = await permissionService.getOrgPermission(
actor,