Skip to content

Commit

Permalink
Limited results to 10 results
Browse files Browse the repository at this point in the history
  • Loading branch information
Rethakgetse-Manaka committed Jun 16, 2024
1 parent 897eced commit 7608c31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions occupi-backend/pkg/handlers/api_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7608c31

Please sign in to comment.