Pass loot search using query string
parent
c72c41e7f3
commit
49b88dbef7
|
@ -8,7 +8,7 @@ module RemoteLootDataService
|
|||
|
||||
def loot(opts = {})
|
||||
# TODO: Add an option to toggle whether the file data is returned or not
|
||||
loots = json_to_mdm_object(self.get_data(LOOT_API_PATH, opts), LOOT_MDM_CLASS, [])
|
||||
loots = json_to_mdm_object(self.get_data(LOOT_API_PATH, nil, opts), LOOT_MDM_CLASS, [])
|
||||
# Save a local copy of the file
|
||||
loots.each do |loot|
|
||||
if loot.data
|
||||
|
|
|
@ -18,7 +18,7 @@ module LootServlet
|
|||
lambda {
|
||||
begin
|
||||
opts = parse_json_request(request, false)
|
||||
data = get_db().loots(opts)
|
||||
data = get_db().loots(params.symbolize_keys)
|
||||
includes = [:host]
|
||||
set_json_response(data, includes)
|
||||
rescue Exception => e
|
||||
|
|
Loading…
Reference in New Issue