From c7f7beaefcdba99fdc1179e9fed1af06e0f0461a Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Thu, 10 Oct 2024 03:35:37 +0530 Subject: [PATCH] feat: use id for scheduling --- src/api/storage.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/storage.ts b/src/api/storage.ts index 47946717..054aeee8 100644 --- a/src/api/storage.ts +++ b/src/api/storage.ts @@ -118,15 +118,15 @@ export const notifyAboutAbort = async (id:string): Promise => { } } -export const scheduleStoredRecording = async (fileName: string, settings: ScheduleSettings): Promise => { +export const scheduleStoredRecording = async (id: string, settings: ScheduleSettings): Promise => { try { const response = await axios.put( - `http://localhost:8080/storage/schedule/${fileName}`, + `http://localhost:8080/storage/schedule/${id}`, {...settings}); if (response.status === 200) { return response.data; } else { - throw new Error(`Couldn't schedule recording ${fileName}. Please try again later.`); + throw new Error(`Couldn't schedule recording ${id}. Please try again later.`); } } catch(error: any) { console.log(error);