fix: address lint

This commit is contained in:
Sheen Capadngan
2025-11-28 04:47:21 +08:00
parent b5e2547af0
commit ec5c5728bf

View File

@@ -46,7 +46,6 @@ const schema = z
name: slugSchema({
field: "Name"
}),
enableDirectIssuance: z.boolean(),
status: z.nativeEnum(CaStatus),
configuration: z
.object({
@@ -99,7 +98,6 @@ export const CaModal = ({ popUp, handlePopUpToggle }: Props) => {
type: CaType.INTERNAL,
name: "",
status: CaStatus.ACTIVE,
enableDirectIssuance: true,
configuration: {
type: InternalCaType.ROOT,
organization: "",
@@ -123,7 +121,6 @@ export const CaModal = ({ popUp, handlePopUpToggle }: Props) => {
type: ca.type,
name: ca.name,
status: ca.status,
enableDirectIssuance: ca.enableDirectIssuance,
configuration: {
type: ca.configuration.type,
organization: ca.configuration.organization,
@@ -150,7 +147,6 @@ export const CaModal = ({ popUp, handlePopUpToggle }: Props) => {
type: CaType.INTERNAL,
name: "",
status: CaStatus.ACTIVE,
enableDirectIssuance: false,
configuration: {
type: InternalCaType.ROOT,
organization: "",
@@ -167,13 +163,7 @@ export const CaModal = ({ popUp, handlePopUpToggle }: Props) => {
}
}, [ca]);
const onFormSubmit = async ({
type,
name,
enableDirectIssuance,
status,
configuration
}: FormData) => {
const onFormSubmit = async ({ type, name, status, configuration }: FormData) => {
if (!currentProject?.slug) return;
if (ca) {
@@ -182,8 +172,7 @@ export const CaModal = ({ popUp, handlePopUpToggle }: Props) => {
id: ca.id,
name,
type: CaType.INTERNAL,
status,
enableDirectIssuance
status
});
} else {
// create
@@ -192,7 +181,6 @@ export const CaModal = ({ popUp, handlePopUpToggle }: Props) => {
name,
type,
status,
enableDirectIssuance,
configuration: {
...configuration,
maxPathLength: Number(configuration.maxPathLength)