Skip to content

Commit

Permalink
fix cancelg
Browse files Browse the repository at this point in the history
  • Loading branch information
genekogan committed Jan 8, 2025
1 parent c904cc7 commit 4009a52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion eve/api/api_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TaskRequest(BaseModel):


class CancelRequest(BaseModel):
task_id: str
taskId: str
user: str


Expand Down
2 changes: 1 addition & 1 deletion eve/api/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async def handle_create(request: TaskRequest):

@handle_errors
async def handle_cancel(request: CancelRequest):
task = Task.from_mongo(request.task_id)
task = Task.from_mongo(request.taskId)
if str(task.user) != request.user:
raise APIError(
"Unauthorized: Task user does not match user_id", status_code=403
Expand Down

0 comments on commit 4009a52

Please sign in to comment.