Enable exec_report_job to handle includes
parent
e480b7dd2c
commit
9099ef0bf1
|
@ -35,7 +35,8 @@ module ServiceServlet
|
|||
def self.report_service
|
||||
lambda {
|
||||
job = lambda { |opts| get_db.report_service(opts) }
|
||||
exec_report_job(request, &job)
|
||||
includes = [:host]
|
||||
exec_report_job(request, includes, &job)
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ module ServletHelper
|
|||
hash.deep_symbolize_keys
|
||||
end
|
||||
|
||||
def exec_report_job(request, &job)
|
||||
def exec_report_job(request, includes = nil, &job)
|
||||
begin
|
||||
|
||||
# report jobs always need data
|
||||
|
@ -44,7 +44,7 @@ module ServletHelper
|
|||
return set_empty_response()
|
||||
else
|
||||
data = job.call(opts)
|
||||
return set_json_response(data)
|
||||
return set_json_response(data, includes)
|
||||
end
|
||||
|
||||
rescue Exception => e
|
||||
|
|
Loading…
Reference in New Issue