mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: remove comments
This commit is contained in:
@@ -101,35 +101,6 @@ const ServiceModeSwarmSchema = z.object({
|
|||||||
|
|
||||||
const LabelsSwarmSchema = z.record(z.string());
|
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) => {
|
const createStringToJSONSchema = (schema: z.ZodTypeAny) => {
|
||||||
return z
|
return z
|
||||||
.string()
|
.string()
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ export const buildType = pgEnum("buildType", [
|
|||||||
"nixpacks",
|
"nixpacks",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// TODO: refactor this types
|
||||||
interface HealthCheckSwarm {
|
interface HealthCheckSwarm {
|
||||||
Test?: string[] | undefined;
|
Test?: string[] | undefined;
|
||||||
Interval?: number | undefined;
|
Interval?: number | undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user