refactor(web): change callback url replace /Tools/Update to /Tolls

This commit is contained in:
Zack Spear
2023-11-15 15:21:02 -08:00
parent c1c4baf476
commit e79ac7122a

View File

@@ -178,7 +178,7 @@ export const useCallbackStoreGeneric = (
console.debug('[callback.send]');
const stringifiedData = JSON.stringify({
actions: [...payload],
sender: window.location.href.replace('/Tools/Update', '/Main'),
sender: window.location.href.replace('/Tools/Update', '/Tools'),
type: sendType ?? callbackActions.sendType,
});
const encryptedMessage = AES.encrypt(
@@ -188,7 +188,7 @@ export const useCallbackStoreGeneric = (
/**
* Build and go to url
*/
const destinationUrl = new URL(url.replace('/Tools/Update', '/Main'));
const destinationUrl = new URL(url.replace('/Tools/Update', '/Tools'));
destinationUrl.searchParams.set('data', encodeURI(encryptedMessage));
console.debug('[callback.send]', encryptedMessage, destinationUrl);
if (redirectType === 'newTab') { // helpful when webgui is in an iframe and callbacks need to be opened in a new tab