fix: address lint

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