Addressed PR suggestions

This commit is contained in:
Carlos Monastyrski
2025-07-23 10:37:23 -03:00
parent 05408bc151
commit 60657f0bc6
11 changed files with 37 additions and 34 deletions
@@ -77,9 +77,9 @@ export const accessApprovalPolicyServiceFactory = ({
if (!envId && !envIds) {
throw new BadRequestError({ message: "Must provide either envId or envIds" });
}
const policy = await accessApprovalPolicyDAL.findPoliciesByEnvIdAndSecretPath({
const policy = await accessApprovalPolicyDAL.findPolicyByEnvIdAndSecretPath({
secretPath,
envIds: envId ? [envId] : envIds || []
envIds: envId ? [envId] : (envIds as string[])
});
return policyId ? policy && policy.id !== policyId : Boolean(policy);
};