From 812f2b10051c1f54865b39b87dd2b0f88e1816a8 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sun, 9 Jun 2024 01:07:17 +0530 Subject: [PATCH] feat: stop current interpretation --- src/api/recording.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/api/recording.ts b/src/api/recording.ts index c399ca1b..6730b6bb 100644 --- a/src/api/recording.ts +++ b/src/api/recording.ts @@ -51,3 +51,16 @@ export const interpretCurrentRecording = async(): Promise => { } }; +export const stopCurrentInterpretation = async(): Promise => { + try { + const response = await axios.get('http://localhost:8080/record/interpret/stop'); + if (response.status === 200) { + return; + } else { + throw new Error('Couldn\'t interpret current recording'); + } + } catch(error: any) { + console.log(error); + } +}; +