fix(approval-policies): improve policies handling

This commit is contained in:
Daniel Hougaard
2025-07-04 03:14:43 +04:00
parent 82634983ce
commit 0569c7e692
5 changed files with 111 additions and 25 deletions
@@ -102,8 +102,7 @@ export const registerSecretApprovalPolicyRouter = async (server: FastifyZodProvi
.string()
.optional()
.nullable()
.transform((val) => (val ? removeTrailingSlash(val) : val))
.transform((val) => (val === "" ? "/" : val)),
.transform((val) => (val ? removeTrailingSlash(val) : val)),
enforcementLevel: z.nativeEnum(EnforcementLevel).optional(),
allowedSelfApprovals: z.boolean().default(true)
}),