mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-17 01:12:59 +00:00
Preliminary scaffolding for CA structures
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import {
|
||||
useMutation
|
||||
// useQueryClient
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import { apiRequest } from "@app/config/request";
|
||||
|
||||
import { TCertificateAuthority, TCreateCaDTO } from "./types";
|
||||
|
||||
export const useCreateCa = () => {
|
||||
// const queryClient = useQueryClient();
|
||||
return useMutation<TCertificateAuthority, {}, TCreateCaDTO>({
|
||||
mutationFn: async (body) => {
|
||||
const {
|
||||
data: { identity }
|
||||
} = await apiRequest.post("/api/v1/ca/", body);
|
||||
return identity;
|
||||
},
|
||||
onSuccess: () => {
|
||||
// queryClient.invalidateQueries(organizationKeys.getOrgIdentityMemberships(organizationId));
|
||||
}
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user