feat: get current url of active RB

This commit is contained in:
karishmas6
2024-06-09 00:37:55 +05:30
parent 06ac9eccbe
commit 0a3d334aa8

View File

@@ -66,3 +66,16 @@ router.get('/active', (req, res) => {
const id = getActiveBrowserId();
return res.send(id);
});
/**
* GET endpoint for getting the current url of the active remote browser.
*/
router.get('/active/url', (req, res) => {
const id = getActiveBrowserId();
if (id) {
const url = getRemoteBrowserCurrentUrl(id);
return res.send(url);
}
return res.send(null);
});