diff --git a/src/api/storage.ts b/src/api/storage.ts index 98e4a3b4..d1b1edac 100644 --- a/src/api/storage.ts +++ b/src/api/storage.ts @@ -147,3 +147,18 @@ export const scheduleStoredRecording = async (id: string, settings: ScheduleSett return {message: '', runId: ''}; } } + + +export const getSchedule = async (id: string): Promise => { + try { + const response = await axios.get(`http://localhost:8080/storage/schedule/${id}`); + if (response.status === 200) { + return response.data; + } else { + throw new Error(`Couldn't retrieve schedule for recording ${id}`); + } + } catch(error: any) { + console.log(error); + return null; + } +} \ No newline at end of file