Update weapon key method to have conditions
We never want all keys, only ever a subset for the weapon we're currently working on
This commit is contained in:
parent
0f72a24e0c
commit
0ee5fc765c
1 changed files with 6 additions and 1 deletions
|
|
@ -1,6 +1,11 @@
|
|||
class Api::V1::WeaponKeysController < Api::V1::ApiController
|
||||
def all
|
||||
@raids = WeaponKeys.all()
|
||||
conditions = {}
|
||||
conditions[:series] = request.params['series']
|
||||
conditions[:slot] = request.params['slot']
|
||||
conditions[:group] = request.params['group'] unless request.params['group'].blank?
|
||||
|
||||
@keys = WeaponKey.where(conditions)
|
||||
render :all, status: :ok
|
||||
end
|
||||
end
|
||||
Loading…
Reference in a new issue