We're using named parametes now

GSoC/Meterpreter_Web_Console
James Barnett 2018-07-30 15:38:48 -05:00
parent 0843e6789d
commit 7dc14f59f4
No known key found for this signature in database
GPG Key ID: 647983861A4EC5EA
1 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ module CredentialServlet
opts[:id] = tmp_params[:id] if tmp_params[:id] opts[:id] = tmp_params[:id] if tmp_params[:id]
data = get_db.update_credential(opts) data = get_db.update_credential(opts)
response = format_cred_json(data) response = format_cred_json(data)
set_json_data_response(response.first) set_json_data_response(response: response.first)
rescue => e rescue => e
print_error_and_create_response(error: e, message: 'There was an error updating the credential:', code: 500) print_error_and_create_response(error: e, message: 'There was an error updating the credential:', code: 500)
end end
@ -74,7 +74,7 @@ module CredentialServlet
begin begin
opts = parse_json_request(request, false) opts = parse_json_request(request, false)
data = get_db.delete_credentials(opts) data = get_db.delete_credentials(opts)
set_json_data_response(data) set_json_data_response(response: data)
rescue => e rescue => e
print_error_and_create_response(error: e, message: 'There was an error deleting the credential:', code: 500) print_error_and_create_response(error: e, message: 'There was an error deleting the credential:', code: 500)
end end