feat: get record linked to RB instance

This commit is contained in:
karishmas6
2024-06-09 00:43:46 +05:30
parent c79b8c73f6
commit 527dbe7dc1

View File

@@ -16,3 +16,17 @@ router.all('/', (req, res, next) => {
logger.log('debug',`The workflow API was invoked: ${req.url}`)
next() // pass control to the next handler
})
/**
* GET endpoint for a recording linked to a remote browser instance.
* returns session's id
*/
router.get('/:browserId', (req, res) => {
const activeBrowser = browserPool.getRemoteBrowser(req.params.browserId);
let workflowFile = null;
if (activeBrowser && activeBrowser.generator) {
workflowFile = activeBrowser.generator.getWorkflowFile();
}
return res.send(workflowFile);
});