Skip to content

Commit

Permalink
Add Event update route
Browse files Browse the repository at this point in the history
  • Loading branch information
lukynmatuska committed Sep 15, 2024
1 parent cd13538 commit e48ad54
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/routers/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ def read_event_by_id(id: int, db: Session = Depends(get_db)):
return event


# @router.patch(
# "/{id}", response_model=event.Event, description="Returns updated event."
# )
# def update_event(
# id: int, updated_event: event.EventBase, db: Session = Depends(get_db)
# ):
# return models.Event.update(db_session=db, id=id, **updated_event.model_dump())
@router.patch(
"/{id}", response_model=event.Event, description="Returns updated event."
)
def update_event(
id: int, updated_event: event.EventBase, db: Session = Depends(get_db)
):
return models.Event.update(db_session=db, id=id, **updated_event.model_dump())


@router.delete(
Expand Down

0 comments on commit e48ad54

Please sign in to comment.