Skip to content

Commit

Permalink
refactor: consolidate task comment creation into task events update e…
Browse files Browse the repository at this point in the history
…ndpoint
  • Loading branch information
Pradip-p committed Aug 8, 2024
1 parent 3404da7 commit 94b019d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/backend/app/tasks/task_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@


@router.post("/{task_id}")
async def create_task_comment(
async def update_task_event(
input: task_schemas.TaskComment,
task_id: uuid.UUID,
db: Database = Depends(database.get_db),
user_data: AuthUser = Depends(login_required),
):
"""
Create or update a comment for a specific task.
update a specific task event.
Args:
comment (task_schemas.TaskComment): The comment data.
Expand All @@ -51,7 +51,7 @@ async def create_task_comment(
raw_sql,
{"task_id": task_id, "state": "UNFLYABLE_TASK", "comment": input.comment},
)
return {"detail": "Successfully created the task comment."}
return {"detail": "Successfully updated the task event."}

except Exception as e:
raise HTTPException(
Expand Down

0 comments on commit 94b019d

Please sign in to comment.