feat: renamed old frontend and fixed some minor bugs

This commit is contained in:
=
2025-01-06 14:56:49 +05:30
parent 8c902d7699
commit 54377a44d3
2577 changed files with 35240 additions and 35116 deletions
@@ -13,15 +13,17 @@ import {
export const useUpdateSlackIntegration = () => {
const queryClient = useQueryClient();
return useMutation<{}, {}, TUpdateSlackIntegrationDTO>({
return useMutation<object, object, TUpdateSlackIntegrationDTO>({
mutationFn: async (dto) => {
const { data } = await apiRequest.patch(`/api/v1/workflow-integrations/slack/${dto.id}`, dto);
return data;
},
onSuccess: (_, { orgId, id }) => {
queryClient.invalidateQueries(workflowIntegrationKeys.getSlackIntegration(id));
queryClient.invalidateQueries(workflowIntegrationKeys.getSlackIntegrations(orgId));
queryClient.invalidateQueries({ queryKey: workflowIntegrationKeys.getSlackIntegration(id) });
queryClient.invalidateQueries({
queryKey: workflowIntegrationKeys.getSlackIntegrations(orgId)
});
}
});
};
@@ -29,15 +31,15 @@ export const useUpdateSlackIntegration = () => {
export const useDeleteSlackIntegration = () => {
const queryClient = useQueryClient();
return useMutation<{}, {}, TDeleteSlackIntegrationDTO>({
return useMutation<object, object, TDeleteSlackIntegrationDTO>({
mutationFn: async (dto) => {
const { data } = await apiRequest.delete(`/api/v1/workflow-integrations/slack/${dto.id}`);
return data;
},
onSuccess: (_, { orgId, id }) => {
queryClient.invalidateQueries(workflowIntegrationKeys.getSlackIntegration(id));
queryClient.invalidateQueries(workflowIntegrationKeys.getIntegrations(orgId));
queryClient.invalidateQueries({ queryKey: workflowIntegrationKeys.getSlackIntegration(id) });
queryClient.invalidateQueries({ queryKey: workflowIntegrationKeys.getIntegrations(orgId) });
}
});
};
@@ -54,7 +56,9 @@ export const useUpdateProjectSlackConfig = () => {
return data;
},
onSuccess: (_, { workspaceId }) => {
queryClient.invalidateQueries(workspaceKeys.getWorkspaceSlackConfig(workspaceId));
queryClient.invalidateQueries({
queryKey: workspaceKeys.getWorkspaceSlackConfig(workspaceId)
});
}
});
};