Minor changes
All checks were successful
Run unit tests / rubocop (pull_request) Successful in 1m27s
Run unit tests / copyright_notice (pull_request) Successful in 2m45s
Run unit tests / check-licenses (pull_request) Successful in 2m46s
Run unit tests / unit_tests (pull_request) Successful in 4m26s
Run unit tests / build-static-assets (pull_request) Successful in 20m24s

This commit is contained in:
Manuel Bustillo 2025-06-12 23:01:03 +02:00
parent 9a99981f67
commit efb5cf64f5

View File

@ -22,12 +22,6 @@ class GuestsController < ApplicationController
end
def update
if user_signed_in?
permitted_params = guest_params
else
permitted_params = params.expect(guest: %i[status])
end
guest = Guest.find(params[:id]).update!(guest_params)
render json: guest.as_json(GUEST_PARAMS), status: :ok
end
@ -40,6 +34,6 @@ class GuestsController < ApplicationController
private
def guest_params
params.expect(guest: %i[name group_id status])
user_signed_in? ? params.expect(guest: %i[name group_id status]) : params.expect(guest: %i[status])
end
end