Add raids#show (#145)
This commit is contained in:
parent
6809030b5a
commit
53760bf87a
2 changed files with 6 additions and 0 deletions
|
|
@ -7,6 +7,11 @@ module Api
|
||||||
render json: RaidBlueprint.render(Raid.all, view: :full)
|
render json: RaidBlueprint.render(Raid.all, view: :full)
|
||||||
end
|
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
|
def groups
|
||||||
render json: RaidGroupBlueprint.render(RaidGroup.all, view: :full)
|
render json: RaidGroupBlueprint.render(RaidGroup.all, view: :full)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ Rails.application.routes.draw do
|
||||||
|
|
||||||
get 'raids', to: 'raids#all'
|
get 'raids', to: 'raids#all'
|
||||||
get 'raids/groups', to: 'raids#groups'
|
get 'raids/groups', to: 'raids#groups'
|
||||||
|
get 'raids/:id', to: 'raids#show'
|
||||||
get 'weapon_keys', to: 'weapon_keys#all'
|
get 'weapon_keys', to: 'weapon_keys#all'
|
||||||
|
|
||||||
post 'characters', to: 'grid_characters#create'
|
post 'characters', to: 'grid_characters#create'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue