From 74f9dd8414824fb08ebc40409290a5955d03c4fa Mon Sep 17 00:00:00 2001 From: Srikar Date: Sat, 14 Feb 2026 02:45:32 +0530 Subject: [PATCH 1/2] Setteled --- app/main.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/main.py b/app/main.py index 1750389..b3d5d19 100644 --- a/app/main.py +++ b/app/main.py @@ -82,6 +82,19 @@ def create_task(task: TaskCreate): def about_backend(): return "This is all backend" +@app.get("/incomplete") +def get_incomplete_tasks(): + """Get incomplete tasks""" + try: + db = get_db_service() + tasks = db.list_documents("tasks", filter_field="completed", filter_value=False) + return { + "tasks": tasks, + "count": len(tasks) + } + except Exception as e: + raise HTTPException(status_code=500, detail=str(e)) + @app.get("/tasks") def list_tasks(limit: int = 100): """List all tasks""" From a59a328664566d4a7f6979ca123de03fd42cd234 Mon Sep 17 00:00:00 2001 From: Srikar Date: Sat, 14 Feb 2026 02:54:56 +0530 Subject: [PATCH 2/2] Add backend --- app/main.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/app/main.py b/app/main.py index b3d5d19..de386d2 100644 --- a/app/main.py +++ b/app/main.py @@ -80,20 +80,10 @@ def create_task(task: TaskCreate): @app.get("/about",response_class=PlainTextResponse) def about_backend(): + """List is going to be here in the future""" + """A simple endpoint to test backend connectivity""" return "This is all backend" -@app.get("/incomplete") -def get_incomplete_tasks(): - """Get incomplete tasks""" - try: - db = get_db_service() - tasks = db.list_documents("tasks", filter_field="completed", filter_value=False) - return { - "tasks": tasks, - "count": len(tasks) - } - except Exception as e: - raise HTTPException(status_code=500, detail=str(e)) @app.get("/tasks") def list_tasks(limit: int = 100):