mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 21:37:59 +00:00
feat: added gateway page in ui for org
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { apiRequest } from "@app/config/request";
|
||||
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||
import { gatewaysQueryKeys } from "./queries";
|
||||
|
||||
export const useDeleteGateway = () => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: (id: string) => {
|
||||
return apiRequest.delete(`/api/v1/gateways/${id}`);
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries(gatewaysQueryKeys.list());
|
||||
}
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user