feat: get crennt tabs of active RB

This commit is contained in:
karishmas6
2024-06-09 00:38:16 +05:30
parent 0a3d334aa8
commit 5d0f7ef09c

View File

@@ -79,3 +79,15 @@ router.get('/active/url', (req, res) => {
return res.send(null);
});
/**
* GET endpoint for getting the current tabs of the active remote browser.
*/
router.get('/active/tabs', (req, res) => {
const id = getActiveBrowserId();
if (id) {
const hosts = getRemoteBrowserCurrentTabs(id);
return res.send(hosts);
}
return res.send([]);
});