status get param for report

This commit is contained in:
amartynov 2014-12-04 13:32:33 +03:00
parent d24a0ae927
commit 3c3f1b1fea

View File

@ -11,7 +11,7 @@ class ReportRoutes < Sinatra::Base
get "/all" do get "/all" do
options = {} options = {}
["project", "deploy_env", "type", "created_by", "date_from", "date_to", "sort"].each do |k| ["project", "deploy_env", "type", "created_by", "date_from", "date_to", "sort", "status"].each do |k|
options[k] = params[k] unless params[k].nil? options[k] = params[k] unless params[k].nil?
end end
json DevopsService.mongo.reports(options).map{|r| r.to_hash} json DevopsService.mongo.reports(options).map{|r| r.to_hash}