feat: get record linked to RB instance
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user