Changed DELETE handler to return JSON "success" key.

Prior to this, nothing was returned. This will allow users to
determine whether or not a rule was removed as expected.
This commit is contained in:
soh_cah_toa
2013-06-05 18:29:18 -04:00
parent 89a5d6fdbb
commit fc6f0aface

View File

@@ -126,7 +126,9 @@ module Dns
raise InvalidParamError, 'Invalid "id" parameter passed to endpoint /api/dns/rule/:id'
end
BeEF::Extension::Dns::Server.instance.remove_rule(id)
result = {}
result[:success] = BeEF::Extension::Dns::Server.instance.remove_rule(id)
result.to_json
rescue InvalidParamError => e
print_error e.message
halt 400