From 7f78d0b0e4879c425266c4bc3dc01631f5a0b761 Mon Sep 17 00:00:00 2001 From: Lukas Holzner Date: Tue, 1 Oct 2024 09:29:30 +0200 Subject: [PATCH] Fixed get Meeting --- backend/app/routers/meetings.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/app/routers/meetings.py b/backend/app/routers/meetings.py index abf0931..9adcf64 100644 --- a/backend/app/routers/meetings.py +++ b/backend/app/routers/meetings.py @@ -131,6 +131,11 @@ def read_meetings(skip: int = 0, limit: int = 100, db: Session = Depends(get_db) return meetings @router.get("/meetings/{meeting_id}", response_model=schemas.MeetingSchema) +def read_meeting_route(meeting_id: int, db: Session = Depends(get_db)): + db_meeting = get_meeting(db, meeting_id=meeting_id) + if db_meeting is None: + raise HTTPException(status_code=404, detail="Meeting not found") + return db_meeting @router.put("/meetings/{meeting_id}", response_model=schemas.Meeting) def update_meeting_route(meeting_id: int, meeting: schemas.MeetingCreate, db: Session = Depends(get_db)):