diff --git a/src/api/recording.ts b/src/api/recording.ts index 186ef74b..9105de6f 100644 --- a/src/api/recording.ts +++ b/src/api/recording.ts @@ -78,4 +78,16 @@ export const getCurrentUrl = async (): Promise => { } }; - +export const getCurrentTabs = async (): Promise => { + try { + const response = await axios.get('http://localhost:8080/record/active/tabs'); + if (response.status === 200) { + return response.data; + } else { + throw new Error('Couldn\'t retrieve stored recordings'); + } + } catch(error: any) { + console.log(error); + return null; + } +};