Skip to content

Commit

Permalink
update controller
Browse files Browse the repository at this point in the history
  • Loading branch information
BANCUNGUYE66 committed Oct 11, 2023
1 parent 196144e commit 7d82559
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/api/reservations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Api::ReservationsController < ApplicationController
# GET /reservations
def index
user_id = params[:user_id]
@reservations = Reservation.includes(:course).where(user_id:)
@reservations = Reservation.includes(:course).where(user_id: user_id)

render json: @reservations, include: :course
end
Expand Down

0 comments on commit 7d82559

Please sign in to comment.