From c41361ae67e3c5ece1a3d6da1c13650ee6342648 Mon Sep 17 00:00:00 2001 From: Sai Sumanth Vadla <104812692+Saisumanthv@users.noreply.github.com> Date: Wed, 7 Jan 2026 16:06:00 +0530 Subject: [PATCH] I have worked on changing tasks to task --- .gitignore | 3 +++ app/main.py | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 078abac..132fa54 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,6 @@ test_firebase.py # OS .DS_Store Thumbs.db + +.env.local +myenv/ \ No newline at end of file diff --git a/app/main.py b/app/main.py index e7ef95f..d14d9e1 100644 --- a/app/main.py +++ b/app/main.py @@ -68,7 +68,7 @@ def health_check(): } # Task CRUD endpoints -@app.post("/tasks") +@app.post("/task") def create_task(task: TaskCreate): """Create a new task""" try: @@ -78,7 +78,7 @@ def create_task(task: TaskCreate): except Exception as e: raise HTTPException(status_code=500, detail=str(e)) -@app.get("/tasks") +@app.get("/task") def list_tasks(limit: int = 100): """List all tasks""" try: @@ -93,7 +93,7 @@ def list_tasks(limit: int = 100): except Exception as e: raise HTTPException(status_code=500, detail=str(e)) -@app.get("/tasks/{task_id}") +@app.get("/task/{task_id}") def get_task(task_id: str): """Get a specific task""" try: @@ -107,7 +107,7 @@ def get_task(task_id: str): except Exception as e: raise HTTPException(status_code=500, detail=str(e)) -@app.put("/tasks/{task_id}") +@app.put("/task/{task_id}") def update_task(task_id: str, task_update: TaskUpdate): """Update a task""" try: @@ -128,7 +128,7 @@ def update_task(task_id: str, task_update: TaskUpdate): except Exception as e: raise HTTPException(status_code=500, detail=str(e)) -@app.delete("/tasks/{task_id}") +@app.delete("/task/{task_id}") def delete_task(task_id: str): """Delete a task""" try: