From a6c6916bf6de88d5c2b20cea159ee31c0fb098a0 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sun, 9 Jun 2024 01:06:04 +0530 Subject: [PATCH] feat: start recording --- src/api/recording.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/api/recording.ts diff --git a/src/api/recording.ts b/src/api/recording.ts new file mode 100644 index 00000000..cc1aa980 --- /dev/null +++ b/src/api/recording.ts @@ -0,0 +1,18 @@ +import { AxiosResponse } from "axios"; + +const axios = require('axios').default; + + +export const startRecording = async() : Promise => { + try { + const response = await axios.get('http://localhost:8080/record/start') + if (response.status === 200) { + return response.data; + } else { + throw new Error('Couldn\'t start recording'); + } + } catch(error: any) { + return ''; + } +}; +