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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user