diff --git a/app/controllers/internal_controller.rb b/app/controllers/internal_controller.rb index 136fe1d2..1eb0488c 100644 --- a/app/controllers/internal_controller.rb +++ b/app/controllers/internal_controller.rb @@ -115,4 +115,10 @@ def show_registration registration = Registration.find(attendee_id) render json: registration end + + def history + attendee_id = params.require(:attendee_id) + history = RegistrationHistory.find(attendee_id) + render json: history + end end diff --git a/config/routes.rb b/config/routes.rb index a748c3b1..8cf590d6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -13,6 +13,7 @@ get '/api/internal/v1/:competition_id/registrations', to: 'internal#list_registrations' post '/api/internal/v1/:competition_id/add', to: 'internal#create' get '/api/internal/v1/:attendee_id', to: 'internal#show_registration' + get '/api/internal/v1/:attendee_id/history', to: 'internal#history' get '/api/internal/v1/users/:user_id/registrations', to: 'internal#registrations_for_user' get '/api/v1/register', to: 'registration#show' post '/api/v1/register', to: 'registration#create'