Skip to content

Commit

Permalink
WIP: avoid cross-geo calls
Browse files Browse the repository at this point in the history
  • Loading branch information
OEvgeny committed Jul 20, 2023
1 parent 8856d24 commit 1a59ec3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Composer/packages/electron-server/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,11 @@ async function run() {
};
});

ipcMain.handle('deeplink', async (evt, url: string) => {
const deeplink = parseDeepLinkUrl(url);
await getMainWindow()?.webContents.loadURL(getBaseUrl() + deeplink);
});

await main();
setTimeout(() => startApp(signalThatMainWindowIsShowing), 500);
await initApp();
Expand Down
10 changes: 8 additions & 2 deletions extensions/pvaPublish/src/node/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ export const publish = async (
try {
logger.log('Starting publish to Power Virtual Agents.');
// authenticate with PVA
const base = baseUrl || getBaseUrl();
const base = baseUrl;
if (!base) {
throw new Error('Base URL is not supplied in published target');
}
const creds = getAuthCredentials(base, tenantId);
const accessToken = await getAccessToken(creds);

Expand Down Expand Up @@ -161,7 +164,10 @@ export const getStatus = async (

try {
// authenticate with PVA
const base = baseUrl || getBaseUrl();
const base = baseUrl;
if (!base) {
throw new Error('Base URL is not supplied in published target');
}
const creds = getAuthCredentials(base, tenantId);
const accessToken = await getAccessToken(creds);

Expand Down

0 comments on commit 1a59ec3

Please sign in to comment.