From 505d2652b0bbd6a20cc467d4636bc8ed699599eb Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sun, 9 Jun 2024 01:08:34 +0530 Subject: [PATCH] feat: get active workflow params --- src/api/workflow.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/api/workflow.ts b/src/api/workflow.ts index ab89675c..b90a95be 100644 --- a/src/api/workflow.ts +++ b/src/api/workflow.ts @@ -17,3 +17,17 @@ export const getActiveWorkflow = async(id: string) : Promise => { } }; +export const getParamsOfActiveWorkflow = async(id: string) : Promise => { + try { + const response = await axios.get(`http://localhost:8080/workflow/params/${id}`) + if (response.status === 200) { + return response.data; + } else { + throw new Error('Something went wrong when fetching the parameters of the recorded workflow'); + } + } catch(error: any) { + console.log(error); + return null; + } +}; +