Add raids#show (#145)

This commit is contained in:
Justin Edmund 2024-02-21 23:25:11 -05:00 committed by GitHub
parent 6809030b5a
commit 53760bf87a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View file

@ -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

View file

@ -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'