From 5a70e616e6189491525697386149fc4bcb90ec4e Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 18 May 2024 03:08:30 -0600 Subject: [PATCH] refactor: remove comments --- .../cluster/modify-swarm-settings.tsx | 29 ------------------- server/db/schema/application.ts | 1 + 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/components/dashboard/application/advanced/cluster/modify-swarm-settings.tsx b/components/dashboard/application/advanced/cluster/modify-swarm-settings.tsx index 1d383f0a..2cf26e2d 100644 --- a/components/dashboard/application/advanced/cluster/modify-swarm-settings.tsx +++ b/components/dashboard/application/advanced/cluster/modify-swarm-settings.tsx @@ -101,35 +101,6 @@ const ServiceModeSwarmSchema = z.object({ const LabelsSwarmSchema = z.record(z.string()); -// const stringToJSONSchema = z -// .string() -// .transform((str, ctx) => { -// try { -// return JSON.parse(str); -// } catch (e) { -// ctx.addIssue({ code: "custom", message: "Invalid JSON format" }); -// return z.NEVER; -// } -// }) -// .superRefine((data, ctx) => { -// const parseResult = HealthCheckSwarmSchema.safeParse(data); -// if (!parseResult.success) { -// for (const error of parseResult.error.issues) { -// const path = error.path.join("."); -// ctx.addIssue({ -// code: z.ZodIssueCode.custom, -// message: `${path} ${error.message}`, -// }); -// } -// // parseResult.error.errors.forEach((error) => { -// // const path = error.path.join("."); -// // ctx.addIssue({ -// // code: z.ZodIssueCode.custom, -// // message: `${path} ${error.message}`, -// // }); -// // }); -// } -// }); const createStringToJSONSchema = (schema: z.ZodTypeAny) => { return z .string() diff --git a/server/db/schema/application.ts b/server/db/schema/application.ts index 8f15fdc8..3222d34c 100644 --- a/server/db/schema/application.ts +++ b/server/db/schema/application.ts @@ -30,6 +30,7 @@ export const buildType = pgEnum("buildType", [ "nixpacks", ]); +// TODO: refactor this types interface HealthCheckSwarm { Test?: string[] | undefined; Interval?: number | undefined;