mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 18:27:19 +00:00
fix: address lint
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user