Rename pki alerting structures

This commit is contained in:
Tuan Dang
2024-08-09 08:27:53 -07:00
parent 556e4d62c4
commit fc4a20caf2
54 changed files with 1443 additions and 161 deletions
+2 -2
View File
@@ -1,2 +1,2 @@
export { useCreateAlert, useDeleteAlert,useUpdateAlert } from "./mutations";
export { useGetAlertById } from "./queries";
export { useCreatePkiAlert, useDeletePkiAlert, useUpdatePkiAlert } from "./mutations";
export { useGetPkiAlertById } from "./queries";
@@ -6,7 +6,7 @@ import { workspaceKeys } from "../workspace/queries";
import { pkiAlertKeys } from "./queries";
import { TCreatePkiAlertDTO, TDeletePkiAlertDTO, TPkiAlert, TUpdatePkiAlertDTO } from "./types";
export const useCreateAlert = () => {
export const useCreatePkiAlert = () => {
const queryClient = useQueryClient();
return useMutation<TPkiAlert, {}, TCreatePkiAlertDTO>({
mutationFn: async (body) => {
@@ -19,7 +19,7 @@ export const useCreateAlert = () => {
});
};
export const useUpdateAlert = () => {
export const useUpdatePkiAlert = () => {
const queryClient = useQueryClient();
return useMutation<TPkiAlert, {}, TUpdatePkiAlertDTO>({
mutationFn: async ({ alertId, ...body }) => {
@@ -36,7 +36,7 @@ export const useUpdateAlert = () => {
});
};
export const useDeleteAlert = () => {
export const useDeletePkiAlert = () => {
const queryClient = useQueryClient();
return useMutation<TPkiAlert, {}, TDeletePkiAlertDTO>({
mutationFn: async ({ alertId }) => {
+1 -1
View File
@@ -8,7 +8,7 @@ export const pkiAlertKeys = {
getPkiAlertById: (alertId: string) => [{ alertId }, "alert"]
};
export const useGetAlertById = (alertId: string) => {
export const useGetPkiAlertById = (alertId: string) => {
return useQuery({
queryKey: pkiAlertKeys.getPkiAlertById(alertId),
queryFn: async () => {