misc: removed updating configuration for internal CAs

This commit is contained in:
Sheen Capadngan
2025-05-30 00:09:47 +08:00
parent f7a9e13209
commit 5c435f7645
4 changed files with 7 additions and 12 deletions

View File

@@ -311,7 +311,6 @@ export const certificateAuthorityServiceFactory = ({
}
const updatedCa = await internalCertificateAuthorityService.updateCaById({
...configuration,
isInternal: true,
enableDirectIssuance,
caId: certificateAuthority.id,

View File

@@ -55,8 +55,4 @@ export const CreateInternalCertificateAuthoritySchema = GenericCreateCertificate
configuration: InternalCertificateAuthorityConfigurationSchema
});
export const UpdateInternalCertificateAuthoritySchema = GenericUpdateCertificateAuthorityFieldsSchema(
CaType.INTERNAL
).extend({
configuration: InternalCertificateAuthorityConfigurationSchema.optional()
});
export const UpdateInternalCertificateAuthoritySchema = GenericUpdateCertificateAuthorityFieldsSchema(CaType.INTERNAL);

View File

@@ -31,10 +31,14 @@ export const useUpdateCa = () => {
return data;
},
onSuccess: ({ projectId, type }) => {
onSuccess: ({ projectId, type }, { caName }) => {
caKeys.getCaByNameAndProjectId(caName, projectId);
queryClient.invalidateQueries({
queryKey: caKeys.listCasByTypeAndProjectId(type, projectId)
});
queryClient.invalidateQueries({
queryKey: caKeys.getCaByNameAndProjectId(caName, projectId)
});
}
});
};

View File

@@ -188,11 +188,7 @@ export const CaModal = ({ popUp, handlePopUpToggle }: Props) => {
name,
type: CaType.INTERNAL,
status,
enableDirectIssuance,
configuration: {
...configuration,
maxPathLength: Number(configuration.maxPathLength)
}
enableDirectIssuance
});
} else {
// create