mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 22:27:22 +00:00
fix: query invalidation
This commit is contained in:
@@ -896,9 +896,17 @@ export const useGetWorkspaceWorkflowIntegrationConfig = ({
|
|||||||
return useQuery({
|
return useQuery({
|
||||||
queryKey: workspaceKeys.getWorkspaceWorkflowIntegrationConfig(workspaceId, integration),
|
queryKey: workspaceKeys.getWorkspaceWorkflowIntegrationConfig(workspaceId, integration),
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const { data } = await apiRequest.get<ProjectWorkflowIntegrationConfig>(
|
const { data } = await apiRequest
|
||||||
`/api/v1/workspace/${workspaceId}/workflow-integration-config/${integration}`
|
.get<ProjectWorkflowIntegrationConfig>(
|
||||||
);
|
`/api/v1/workspace/${workspaceId}/workflow-integration-config/${integration}`
|
||||||
|
)
|
||||||
|
.catch((err) => {
|
||||||
|
if (err.response.status === 404) {
|
||||||
|
return { data: null };
|
||||||
|
}
|
||||||
|
|
||||||
|
throw err;
|
||||||
|
});
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@ import {
|
|||||||
import { UsePopUpState } from "@app/hooks/usePopUp";
|
import { UsePopUpState } from "@app/hooks/usePopUp";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
microsoftTeamsConfig?: ProjectWorkflowIntegrationConfig;
|
microsoftTeamsConfig?: ProjectWorkflowIntegrationConfig | null;
|
||||||
isMicrosoftTeamsConfigLoading: boolean;
|
isMicrosoftTeamsConfigLoading: boolean;
|
||||||
handlePopUpOpen: (
|
handlePopUpOpen: (
|
||||||
popUpName: keyof UsePopUpState<["removeIntegration", "editIntegration"]>,
|
popUpName: keyof UsePopUpState<["removeIntegration", "editIntegration"]>,
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@ import {
|
|||||||
import { UsePopUpState } from "@app/hooks/usePopUp";
|
import { UsePopUpState } from "@app/hooks/usePopUp";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
slackConfig?: ProjectWorkflowIntegrationConfig;
|
slackConfig?: ProjectWorkflowIntegrationConfig | null;
|
||||||
isSlackConfigLoading: boolean;
|
isSlackConfigLoading: boolean;
|
||||||
handlePopUpOpen: (
|
handlePopUpOpen: (
|
||||||
popUpName: keyof UsePopUpState<["removeIntegration", "editIntegration"]>,
|
popUpName: keyof UsePopUpState<["removeIntegration", "editIntegration"]>,
|
||||||
|
|||||||
Reference in New Issue
Block a user