Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fmanimashaun committed Feb 25, 2024
1 parent 29ef144 commit 855386b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/controllers/api/v1/reservations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ def index
@reservations = current_user.reservations.includes(:car, :city)

render json: {
status: { code: 200, message: 'Reservations fetched.' },
data: @reservations.map { |reservation| ReservationSerializer.new(reservation).serializable_hash[:data][:attributes] }
status: { code: 200, message: 'Reservations fetched successfully' },
data: @reservations.map do |reservation|
ReservationSerializer.new(reservation).serializable_hash[:data][:attributes]
end
}, status: :ok
end

Expand Down

0 comments on commit 855386b

Please sign in to comment.