From 59e04c1330e7e250cda0eaf6361cd00c3a45b2b0 Mon Sep 17 00:00:00 2001 From: "sandipsamal117@gmail.com" Date: Thu, 3 Aug 2023 11:52:44 -0400 Subject: [PATCH] Added API to show prod workflows --- app/config.py | 2 +- app/routes/workflow.py | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/config.py b/app/config.py index 8e394bf..eb9e7c0 100644 --- a/app/config.py +++ b/app/config.py @@ -3,7 +3,7 @@ class Settings(BaseSettings): pflink_mongodb: MongoDsn = 'mongodb://localhost:27017' - version: str = "3.5.4" + version: str = "3.6.0" class Auth(BaseSettings): diff --git a/app/routes/workflow.py b/app/routes/workflow.py index c7cb86d..f3af2df 100644 --- a/app/routes/workflow.py +++ b/app/routes/workflow.py @@ -22,6 +22,15 @@ async def create_workflow(data: WorkflowRequestSchema) -> WorkflowStatusResponse return response +@router.get("/list", response_description="All workflows retrieved") +async def get_workflows(): + """ + Fetch all workflows currently present in the database + """ + workflows = workflow.retrieve_workflows() + return workflows + + @router.delete("", response_description="All workflows deleted") async def delete_workflows(): """