From 000a047723610fb4aa0ad1c8baa408b9d0159bc6 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 1 Jun 2024 11:20:14 +0530 Subject: [PATCH] feat: gget active remote browser id --- server/src/browser-management/controller.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/src/browser-management/controller.ts b/server/src/browser-management/controller.ts index 39b8f931..eb51a104 100644 --- a/server/src/browser-management/controller.ts +++ b/server/src/browser-management/controller.ts @@ -81,4 +81,14 @@ export const destroyRemoteBrowser = async (id: string) : Promise => { } return browserPool.deleteRemoteBrowser(id); }; + +/** + * Returns the id of an active browser or null. + * Wrapper around {@link browserPool.getActiveBrowserId()} function. + * @returns {string | null} + * @category BrowserManagement-Controller + */ +export const getActiveBrowserId = (): string | null=> { + return browserPool.getActiveBrowserId(); +}; };