style: run prettier to fix formatting issues after upstream merge
This commit is contained in:
1 parent
05814854df
commit
3e010f1c0d
1 file changed
+16
-11
@@ -99,14 +99,19 @@ export const sendTestEmailBodyValidation = z.object({
|
|||||||
systemEmailTLSServername: z.union([z.string(), z.literal("")]).optional(),
|
systemEmailTLSServername: z.union([z.string(), z.literal("")]).optional(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateNotificationsValidation = z.object({
|
export const updateNotificationsValidation = z
|
||||||
monitorIds: z.array(z.string()).min(1, "At least one monitor ID is required"),
|
.object({
|
||||||
notificationIds: z.array(z.string()),
|
monitorIds: z.array(z.string()).min(1, "At least one monitor ID is required"),
|
||||||
action: z.enum(["add", "remove", "set"] as const),
|
notificationIds: z.array(z.string()),
|
||||||
}).refine((data) => {
|
action: z.enum(["add", "remove", "set"] as const),
|
||||||
if (data.action !== "set" && data.notificationIds.length === 0) return false;
|
})
|
||||||
return true;
|
.refine(
|
||||||
}, {
|
(data) => {
|
||||||
message: "Notification IDs cannot be empty unless action is 'set'",
|
if (data.action !== "set" && data.notificationIds.length === 0) return false;
|
||||||
path: ["notificationIds"],
|
return true;
|
||||||
});
|
},
|
||||||
|
{
|
||||||
|
message: "Notification IDs cannot be empty unless action is 'set'",
|
||||||
|
path: ["notificationIds"],
|
||||||
|
}
|
||||||
|
);
|
||||||
Reference in new issue
Block a user