fix: resolved universal auth update failing

This commit is contained in:
=
2024-10-22 20:35:22 +05:30
committed by Daniel Hougaard
parent a4ca996a1b
commit 726477e3d7

View File

@@ -241,9 +241,9 @@ export const identityUaServiceFactory = ({
const identityMembershipOrg = await identityOrgMembershipDAL.findOne({ 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({
message: "Failed to update universal auth"
message: "The identity does not have universal auth"
});
}