Fix: Use unique parameter for passing devops org name

Used to be teamId, now it's azureDevopsOrgName.
This commit is contained in:
Daniel Hougaard
2024-08-26 15:13:18 +04:00
parent 8b80622d2f
commit a18015b1e5
7 changed files with 29 additions and 11 deletions
@@ -120,16 +120,22 @@ const fetchIntegrationAuthById = async (integrationAuthId: string) => {
const fetchIntegrationAuthApps = async ({
integrationAuthId,
teamId,
azureDevOpsOrgName,
workspaceSlug
}: {
integrationAuthId: string;
teamId?: string;
azureDevOpsOrgName?: string;
workspaceSlug?: string;
}) => {
const params: Record<string, string> = {};
if (teamId) {
params.teamId = teamId;
}
if (azureDevOpsOrgName) {
params.azureDevOpsOrgName = azureDevOpsOrgName;
}
if (workspaceSlug) {
params.workspaceSlug = workspaceSlug;
}
@@ -452,10 +458,12 @@ export const useGetIntegrationAuthById = (integrationAuthId: string) => {
export const useGetIntegrationAuthApps = ({
integrationAuthId,
teamId,
azureDevOpsOrgName,
workspaceSlug
}: {
integrationAuthId: string;
teamId?: string;
azureDevOpsOrgName?: string;
workspaceSlug?: string;
}) => {
return useQuery({
@@ -464,6 +472,7 @@ export const useGetIntegrationAuthApps = ({
fetchIntegrationAuthApps({
integrationAuthId,
teamId,
azureDevOpsOrgName,
workspaceSlug
}),
enabled: true