From 92caee5a7742283876eb20e036be06cfb1da30b0 Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Fri, 3 Apr 2026 23:00:27 -0600 Subject: [PATCH] refactor(certificate): remove auto-renew field from certificate handling - Eliminated the `autoRenew` field from the certificate schema, API router, and related components to streamline certificate management. - Updated form handling and validation logic accordingly to reflect the removal of the auto-renew feature. --- .../certificates/handle-certificate.tsx | 22 ------------------- .../dokploy/server/api/routers/certificate.ts | 1 - packages/server/src/db/schema/certificate.ts | 1 - packages/server/src/services/certificate.ts | 1 - 4 files changed, 25 deletions(-) diff --git a/apps/dokploy/components/dashboard/settings/certificates/handle-certificate.tsx b/apps/dokploy/components/dashboard/settings/certificates/handle-certificate.tsx index ff48d13fd..861822a91 100644 --- a/apps/dokploy/components/dashboard/settings/certificates/handle-certificate.tsx +++ b/apps/dokploy/components/dashboard/settings/certificates/handle-certificate.tsx @@ -6,7 +6,6 @@ import { toast } from "sonner"; import { z } from "zod"; import { AlertBlock } from "@/components/shared/alert-block"; import { Button } from "@/components/ui/button"; -import { Checkbox } from "@/components/ui/checkbox"; import { Dialog, DialogContent, @@ -52,7 +51,6 @@ const handleCertificateSchema = z.object({ name: z.string().min(1, "Name is required"), certificateData: z.string().min(1, "Certificate data is required"), privateKey: z.string().min(1, "Private key is required"), - autoRenew: z.boolean().optional(), serverId: z.string().optional(), }); @@ -86,7 +84,6 @@ export const HandleCertificate = ({ certificateId }: Props) => { name: "", certificateData: "", privateKey: "", - autoRenew: false, }, resolver: zodResolver(handleCertificateSchema), }); @@ -97,14 +94,12 @@ export const HandleCertificate = ({ certificateId }: Props) => { name: existingCert.name, certificateData: existingCert.certificateData, privateKey: existingCert.privateKey, - autoRenew: existingCert.autoRenew ?? false, }); } else { form.reset({ name: "", certificateData: "", privateKey: "", - autoRenew: false, }); } }, [existingCert, form, open]); @@ -114,7 +109,6 @@ export const HandleCertificate = ({ certificateId }: Props) => { name: data.name, certificateData: data.certificateData, privateKey: data.privateKey, - autoRenew: data.autoRenew, }; const promise = certificateId @@ -232,22 +226,6 @@ export const HandleCertificate = ({ certificateId }: Props) => { )} /> - ( - - - - - Auto-renew - - - )} - /> {shouldShowServerDropdown && ( { const updated = await db