Skip to content

Commit

Permalink
test stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
hartra344 committed Jun 7, 2024
1 parent 60cd062 commit a6a6073
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions libs/designer/src/lib/core/templates/templateFiles
Submodule templateFiles added at 7810d1
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ export class StandardRunService implements IRunService {
}
}

public static getProxyUrl(uri: string): { uri: string, headerPath: string } {
const appName = uri.split('hostruntime')[0].split('/');
appName.pop();
return { uri: `${uri.split('hostruntime')[0]}/providers/Microsoft.App/logicapps/${appName.pop()}/invoke?api-version=2024-02-02-preview`, headerPath: uri.split('hostruntime')[1] };
}

/**
* Gets run details.
* @param {string} runId - Run id.
Expand All @@ -103,7 +109,19 @@ export class StandardRunService implements IRunService {

const uri = `${baseUrl}/workflows/${workflowName}/runs/${runId}?api-version=${apiVersion}&$expand=properties/actions,workflow/properties`;


try {
if (uri.toLowerCase().includes('microsoft.app')) {
const { uri: newUri, headerPath } = StandardRunService.getProxyUrl(uri);
const response = await httpClient.post<Run, unknown>({
uri: newUri,
headers: {
'X-Ms-Logicapps-Proxy-Path': headerPath,
'X-Ms-Logicapps-Proxy-Method': 'GET',
},
});
return response;
}
const response = await httpClient.get<Run>({
uri,
});
Expand Down

0 comments on commit a6a6073

Please sign in to comment.