fix: resolved universal auth update failing

This commit is contained in:
=
2024-10-26 23:27:38 +04:00
committed by Daniel Hougaard
parent a4ca996a1b
commit 726477e3d7
@@ -241,9 +241,9 @@ export const identityUaServiceFactory = ({
const identityMembershipOrg = await identityOrgMembershipDAL.findOne({ identityId }); const identityMembershipOrg = await identityOrgMembershipDAL.findOne({ identityId });
if (!identityMembershipOrg) throw new NotFoundError({ message: `Failed to find identity with ID ${identityId}` }); if (!identityMembershipOrg) throw new NotFoundError({ message: `Failed to find identity with ID ${identityId}` });
if (identityMembershipOrg.identity.authMethods.includes(IdentityAuthMethod.UNIVERSAL_AUTH)) { if (!identityMembershipOrg.identity.authMethods.includes(IdentityAuthMethod.UNIVERSAL_AUTH)) {
throw new BadRequestError({ throw new BadRequestError({
message: "Failed to update universal auth" message: "The identity does not have universal auth"
}); });
} }