diff --git a/app/models/events.py b/app/models/events.py index d8b14cd..fd187fd 100644 --- a/app/models/events.py +++ b/app/models/events.py @@ -27,6 +27,7 @@ class EventIn(BaseModel): name: str place: str status: int = 0 + organizers: list[str] = [] start_date: datetime | None = None end_date: datetime | None = None diff --git a/app/routers/events.py b/app/routers/events.py index 451467c..987fca6 100644 --- a/app/routers/events.py +++ b/app/routers/events.py @@ -158,6 +158,7 @@ async def update_events(authorize: Annotated[bool, Depends(permissions_checker.P event = events.Event(name=eventSingle.name, place=eventSingle.place) event.start_date = eventSingle.start_date event.end_date = eventSingle.end_date + event.organizers = eventSingle.organizers event.created_at = datetime.today() event_repository.save(event) content = {"message": "event is created"} @@ -185,6 +186,7 @@ async def update_events_id(item_id: str, authorize: Annotated[bool, Depends(perm event.place = eventSingle.place event.start_date = eventSingle.start_date event.end_date = eventSingle.end_date + event.organizers = eventSingle.organizers event.updated_at = datetime.today() event_repository.save(event) content = {"message": "event is updated"}