From 5d0f7ef09c793f32be9467009b2fa2820687ac06 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sun, 9 Jun 2024 00:38:16 +0530 Subject: [PATCH] feat: get crennt tabs of active RB --- server/src/routes/record.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/server/src/routes/record.ts b/server/src/routes/record.ts index 0c27ceec..51085a01 100644 --- a/server/src/routes/record.ts +++ b/server/src/routes/record.ts @@ -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([]); +}); +