mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-05 07:26:34 +00:00
Add missing stuff for ui
This commit is contained in:
@@ -27,7 +27,8 @@ export const createCertificateProfileSchema = z
|
|||||||
autoRenew: z.boolean().default(false),
|
autoRenew: z.boolean().default(false),
|
||||||
renewBeforeDays: z.number().min(1).max(30).optional()
|
renewBeforeDays: z.number().min(1).max(30).optional()
|
||||||
})
|
})
|
||||||
.optional()
|
.optional(),
|
||||||
|
acmeConfig: z.object({}).optional()
|
||||||
})
|
})
|
||||||
.refine(
|
.refine(
|
||||||
(data) => {
|
(data) => {
|
||||||
@@ -38,6 +39,9 @@ export const createCertificateProfileSchema = z
|
|||||||
if (data.apiConfig) {
|
if (data.apiConfig) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (data.acmeConfig) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (data.enrollmentType === EnrollmentType.API) {
|
if (data.enrollmentType === EnrollmentType.API) {
|
||||||
if (!data.apiConfig) {
|
if (!data.apiConfig) {
|
||||||
@@ -46,6 +50,20 @@ export const createCertificateProfileSchema = z
|
|||||||
if (data.estConfig) {
|
if (data.estConfig) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (data.acmeConfig) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (data.enrollmentType === EnrollmentType.ACME) {
|
||||||
|
if (!data.acmeConfig) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (data.estConfig) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (data.apiConfig) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|||||||
+2
@@ -288,6 +288,8 @@ export const CreateProfileModal = ({ isOpen, onClose, profile, mode = "create" }
|
|||||||
};
|
};
|
||||||
} else if (data.enrollmentType === "api" && data.apiConfig) {
|
} else if (data.enrollmentType === "api" && data.apiConfig) {
|
||||||
createData.apiConfig = data.apiConfig;
|
createData.apiConfig = data.apiConfig;
|
||||||
|
} else if (data.enrollmentType === "acme" && data.acmeConfig) {
|
||||||
|
createData.acmeConfig = data.acmeConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
await createProfile.mutateAsync(createData);
|
await createProfile.mutateAsync(createData);
|
||||||
|
|||||||
Reference in New Issue
Block a user