fix(traefik): allow to save domain without letsencrypt email when the cert is none #542

This commit is contained in:
Mauricio Siu
2024-10-12 16:44:10 -06:00
parent 339697437a
commit 8036455c2d
3 changed files with 29 additions and 9 deletions

View File

@@ -45,6 +45,7 @@ const createSchema = createInsertSchema(admins, {
sshPrivateKey: z.string().optional(),
certificateType: z.enum(["letsencrypt", "none"]).default("none"),
serverIp: z.string().optional(),
letsEncryptEmail: z.string().optional(),
});
export const apiSaveSSHKey = createSchema
@@ -55,11 +56,14 @@ export const apiSaveSSHKey = createSchema
export const apiAssignDomain = createSchema
.pick({
letsEncryptEmail: true,
host: true,
certificateType: true,
letsEncryptEmail: true,
})
.required();
.required()
.partial({
letsEncryptEmail: true,
});
export const apiUpdateDockerCleanup = createSchema
.pick({