mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 23:25:26 +00:00
Fix merge conflicts
This commit is contained in:
@@ -21,7 +21,10 @@ import { TSshHost } from "../sshHost/types";
|
||||
import { TSshHostGroup } from "../sshHostGroup/types";
|
||||
import { userKeys } from "../users/query-keys";
|
||||
import { TWorkspaceUser } from "../users/types";
|
||||
import { ProjectSlackConfig } from "../workflowIntegrations/types";
|
||||
import {
|
||||
ProjectWorkflowIntegrationConfig,
|
||||
WorkflowIntegrationPlatform
|
||||
} from "../workflowIntegrations/types";
|
||||
import { workspaceKeys } from "./query-keys";
|
||||
import {
|
||||
CreateEnvironmentDTO,
|
||||
@@ -899,13 +902,27 @@ export const useListWorkspaceSshCertificateTemplates = (projectId: string) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const useGetWorkspaceSlackConfig = ({ workspaceId }: { workspaceId: string }) => {
|
||||
export const useGetWorkspaceWorkflowIntegrationConfig = ({
|
||||
workspaceId,
|
||||
integration
|
||||
}: {
|
||||
workspaceId: string;
|
||||
integration: WorkflowIntegrationPlatform;
|
||||
}) => {
|
||||
return useQuery({
|
||||
queryKey: workspaceKeys.getWorkspaceSlackConfig(workspaceId),
|
||||
queryKey: workspaceKeys.getWorkspaceWorkflowIntegrationConfig(workspaceId, integration),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<ProjectSlackConfig>(
|
||||
`/api/v1/workspace/${workspaceId}/slack-config`
|
||||
);
|
||||
const { data } = await apiRequest
|
||||
.get<ProjectWorkflowIntegrationConfig>(
|
||||
`/api/v1/workspace/${workspaceId}/workflow-integration-config/${integration}`
|
||||
)
|
||||
.catch((err) => {
|
||||
if (err.response.status === 404) {
|
||||
return { data: null };
|
||||
}
|
||||
|
||||
throw err;
|
||||
});
|
||||
|
||||
return data;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user