diff --git a/app/controllers/api/v1/raids_controller.rb b/app/controllers/api/v1/raids_controller.rb index e59397f..c403288 100644 --- a/app/controllers/api/v1/raids_controller.rb +++ b/app/controllers/api/v1/raids_controller.rb @@ -7,6 +7,11 @@ module Api render json: RaidBlueprint.render(Raid.all, view: :full) end + def show + raid = Raid.find_by(slug: params[:id]) + render json: RaidBlueprint.render(Raid.find_by(slug: params[:id]), view: :full) if raid + end + def groups render json: RaidGroupBlueprint.render(RaidGroup.all, view: :full) end diff --git a/config/routes.rb b/config/routes.rb index 9e13ee8..9fcb2af 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -48,6 +48,7 @@ Rails.application.routes.draw do get 'raids', to: 'raids#all' get 'raids/groups', to: 'raids#groups' + get 'raids/:id', to: 'raids#show' get 'weapon_keys', to: 'weapon_keys#all' post 'characters', to: 'grid_characters#create'