Skip to content
This repository was archived by the owner on Jan 3, 2025. It is now read-only.

Add internal waiting_list route for migration #734

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/controllers/internal_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,10 @@ def history
history = RegistrationHistory.find(attendee_id)
render json: history
end

def waiting_list
competition_id = params.require(:competition_id)
waiting_list = WaitingList.find(competition_id)
render json: waiting_list.entries
end
end
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
get '/healthcheck', to: 'healthcheck#index'
post '/api/internal/v1/update_payment', to: 'internal#update_payment_status'
get '/api/internal/v1/:competition_id/registrations', to: 'internal#list_registrations'
get '/api/internal/v1/:competition_id/waiting_list', to: 'internal#waiting_list'
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'
Expand Down
Loading