diff --git a/occupi-backend/pkg/handlers/api_handlers.go b/occupi-backend/pkg/handlers/api_handlers.go index d15be75a..b61094a2 100644 --- a/occupi-backend/pkg/handlers/api_handlers.go +++ b/occupi-backend/pkg/handlers/api_handlers.go @@ -169,8 +169,8 @@ func ViewRooms(ctx *gin.Context, appsession *models.AppSession) { // If FloorNo is provided, filter by FloorNo rooms, err = database.GetAllRooms(ctx, appsession.DB, room.FloorNo) } else { - // If FloorNo is not provided, fetch all rooms - rooms, err = database.GetAllRooms(ctx, appsession.DB, -1) // Assuming 0 means no filter + // If FloorNo is not provided, fetch all rooms on the ground floor + rooms, err = database.GetAllRooms(ctx, appsession.DB, 0) } if err != nil {