Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ test_firebase.py
# OS
.DS_Store
Thumbs.db

.env.local
myenv/
10 changes: 5 additions & 5 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down