From 920d351ccf0a318f01423559b4418a1a5e4d5de8 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sun, 9 Jun 2024 01:06:58 +0530 Subject: [PATCH] feat: interpret current recording --- src/api/recording.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/api/recording.ts b/src/api/recording.ts index 89ae4dfe..c399ca1b 100644 --- a/src/api/recording.ts +++ b/src/api/recording.ts @@ -37,3 +37,17 @@ export const getActiveBrowserId = async(): Promise => { } }; +export const interpretCurrentRecording = async(): Promise => { + try { + const response = await axios.get('http://localhost:8080/record/interpret'); + if (response.status === 200) { + return true; + } else { + throw new Error('Couldn\'t interpret current recording'); + } + } catch(error: any) { + console.log(error); + return false; + } +}; +