From b573453d2d61f724213960cb3036f33c1bfd6f46 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sun, 9 Jun 2024 00:45:00 +0530 Subject: [PATCH] feat: return param array of recording associated with browserId --- server/src/routes/workflow.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/server/src/routes/workflow.ts b/server/src/routes/workflow.ts index d40c1856..195921a3 100644 --- a/server/src/routes/workflow.ts +++ b/server/src/routes/workflow.ts @@ -30,3 +30,15 @@ router.get('/:browserId', (req, res) => { return res.send(workflowFile); }); +/** + * Get endpoint returning the parameter array of the recording associated with the browserId browser instance. + */ +router.get('/params/:browserId', (req, res) => { + const activeBrowser = browserPool.getRemoteBrowser(req.params.browserId); + let params = null; + if (activeBrowser && activeBrowser.generator) { + params = activeBrowser.generator.getParams(); + } + return res.send(params); +}); +