Omit parentheses for no argument get_db calls
parent
975948439d
commit
8d660084fc
|
@ -21,7 +21,7 @@ module VulnAttemptServlet
|
|||
lambda {
|
||||
begin
|
||||
opts = parse_json_request(request, false)
|
||||
data = get_db().vuln_attempts(params.symbolize_keys)
|
||||
data = get_db.vuln_attempts(params.symbolize_keys)
|
||||
set_json_response(data)
|
||||
rescue Exception => e
|
||||
set_error_on_response(e)
|
||||
|
@ -34,8 +34,8 @@ module VulnAttemptServlet
|
|||
begin
|
||||
job = lambda { |opts|
|
||||
vuln_id = opts.delete(:vuln_id)
|
||||
vuln = get_db().vulns(id: vuln_id).first
|
||||
get_db().report_vuln_attempt(vuln, opts)
|
||||
vuln = get_db.vulns(id: vuln_id).first
|
||||
get_db.report_vuln_attempt(vuln, opts)
|
||||
}
|
||||
exec_report_job(request, &job)
|
||||
rescue Exception => e
|
||||
|
|
|
@ -23,7 +23,7 @@ module VulnServlet
|
|||
lambda {
|
||||
begin
|
||||
opts = parse_json_request(request, false)
|
||||
data = get_db().vulns(params.symbolize_keys)
|
||||
data = get_db.vulns(params.symbolize_keys)
|
||||
includes = [:host, :vulns_refs, :refs, :module_refs]
|
||||
set_json_response(data, includes)
|
||||
rescue Exception => e
|
||||
|
@ -36,7 +36,7 @@ module VulnServlet
|
|||
lambda {
|
||||
begin
|
||||
job = lambda { |opts|
|
||||
get_db().report_vuln(opts)
|
||||
get_db.report_vuln(opts)
|
||||
}
|
||||
exec_report_job(request, &job)
|
||||
rescue Exception => e
|
||||
|
@ -51,7 +51,7 @@ module VulnServlet
|
|||
opts = parse_json_request(request, false)
|
||||
tmp_params = params.symbolize_keys
|
||||
opts[:id] = tmp_params[:id] if tmp_params[:id]
|
||||
data = get_db().update_vuln(opts)
|
||||
data = get_db.update_vuln(opts)
|
||||
set_json_response(data)
|
||||
rescue Exception => e
|
||||
set_error_on_response(e)
|
||||
|
@ -63,7 +63,7 @@ module VulnServlet
|
|||
lambda {
|
||||
begin
|
||||
opts = parse_json_request(request, false)
|
||||
data = get_db().delete_vuln(opts)
|
||||
data = get_db.delete_vuln(opts)
|
||||
set_json_response(data)
|
||||
rescue Exception => e
|
||||
set_error_on_response(e)
|
||||
|
|
Loading…
Reference in New Issue