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