From 64e313de015ee50c59e80f7c4d7c212bda30714b Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Thu, 10 Oct 2024 02:24:23 +0530 Subject: [PATCH] feat: use id instead of runId --- src/api/storage.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/api/storage.ts b/src/api/storage.ts index e72d400d..47946717 100644 --- a/src/api/storage.ts +++ b/src/api/storage.ts @@ -90,13 +90,13 @@ export const createRunForStoredRecording = async (id: string, settings: RunSetti } } -export const interpretStoredRecording = async (runId: string): Promise => { +export const interpretStoredRecording = async (id: string): Promise => { try { - const response = await axios.post(`http://localhost:8080/storage/runs/run/${runId}`); + const response = await axios.post(`http://localhost:8080/storage/runs/run/${id}`); if (response.status === 200) { return response.data; } else { - throw new Error(`Couldn't run a recording ${runId}`); + throw new Error(`Couldn't run a recording ${id}`); } } catch(error: any) { console.log(error); @@ -104,13 +104,13 @@ export const interpretStoredRecording = async (runId: string): Promise } } -export const notifyAboutAbort = async (runId:string): Promise => { +export const notifyAboutAbort = async (id:string): Promise => { try { - const response = await axios.post(`http://localhost:8080/storage/runs/abort/${runId}`); + const response = await axios.post(`http://localhost:8080/storage/runs/abort/${id}`); if (response.status === 200) { return response.data; } else { - throw new Error(`Couldn't abort a running recording with id ${runId}`); + throw new Error(`Couldn't abort a running recording with id ${id}`); } } catch(error: any) { console.log(error);