Skip to content

Commit

Permalink
Cleaning the gossiper API
Browse files Browse the repository at this point in the history
This replaces the void method in the gossiper API to be json_void

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
  • Loading branch information
amnonh committed Jul 15, 2015
1 parent b6fa218 commit 83a64d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/gossiper.cc
Expand Up @@ -7,6 +7,7 @@
#include <gms/gossiper.hh>

namespace api {
using namespace json;

void set_gossiper(http_context& ctx, routes& r) {
httpd::gossiper_json::get_down_endpoint.set(r, [](std::unique_ptr<request> req) {
Expand Down Expand Up @@ -38,11 +39,11 @@ void set_gossiper(http_context& ctx, routes& r) {
httpd::gossiper_json::assassinate_endpoint.set(r, [](std::unique_ptr<request> req) {
if (req->get_query_param("unsafe") != "True") {
return gms::assassinate_endpoint(req->param["addr"]).then([] {
return make_ready_future<json::json_return_type>("");
return make_ready_future<json::json_return_type>(json_void());
});
}
return gms::unsafe_assassinate_endpoint(req->param["addr"]).then([] {
return make_ready_future<json::json_return_type>("");
return make_ready_future<json::json_return_type>(json_void());
});
});
}
Expand Down

0 comments on commit 83a64d7

Please sign in to comment.