diff --git a/src/api/recording.ts b/src/api/recording.ts index b8247b53..89ae4dfe 100644 --- a/src/api/recording.ts +++ b/src/api/recording.ts @@ -24,3 +24,16 @@ export const stopRecording = async (id: string): Promise => { }); }; +export const getActiveBrowserId = async(): Promise => { + try { + const response = await axios.get('http://localhost:8080/record/active'); + if (response.status === 200) { + return response.data; + } else { + throw new Error('Couldn\'t get active browser'); + } + } catch(error: any) { + return ''; + } +}; +