diff --git a/plugins/http_plugin/include/eosio/http_plugin/http_plugin.hpp b/plugins/http_plugin/include/eosio/http_plugin/http_plugin.hpp index a1c5962224..f6d3d5c44d 100644 --- a/plugins/http_plugin/include/eosio/http_plugin/http_plugin.hpp +++ b/plugins/http_plugin/include/eosio/http_plugin/http_plugin.hpp @@ -37,7 +37,8 @@ namespace eosio { * a handler. The URL is the path on the web server that triggers the * call, and the handler is the function which implements the API call */ - using api_description = std::map; + using api_entry = std::pair; + using api_description = std::vector; enum class http_content_type { json = 1, diff --git a/plugins/http_plugin/include/eosio/http_plugin/macros.hpp b/plugins/http_plugin/include/eosio/http_plugin/macros.hpp index c5a6057373..f217b94962 100644 --- a/plugins/http_plugin/include/eosio/http_plugin/macros.hpp +++ b/plugins/http_plugin/include/eosio/http_plugin/macros.hpp @@ -15,7 +15,7 @@ struct async_result_visitor : public fc::visitor { auto params = parse_params(body);\ FC_CHECK_DEADLINE(deadline);\ api_handle.call_name( std::move(params), \ - [cb, body](const std::variant& result){\ + [cb=std::move(cb), body=std::move(body)](const std::variant& result){ \ if (std::holds_alternative(result)) {\ try {\ std::get(result)->dynamic_rethrow_exception();\ diff --git a/plugins/producer_api_plugin/producer_api_plugin.cpp b/plugins/producer_api_plugin/producer_api_plugin.cpp index 14b6b19006..c2e13f9f71 100644 --- a/plugins/producer_api_plugin/producer_api_plugin.cpp +++ b/plugins/producer_api_plugin/producer_api_plugin.cpp @@ -43,7 +43,7 @@ struct async_result_visitor : public fc::visitor { {std::string("/v1/" #api_name "/" #call_name), \ [&api_handle](string&&, string&& body, url_response_callback&& cb) mutable { \ if (body.empty()) body = "{}"; \ - auto next = [cb, body](const std::variant& result){\ + auto next = [cb=std::move(cb), body=std::move(body)](const std::variant& result){ \ if (std::holds_alternative(result)) {\ try {\ std::get(result)->dynamic_rethrow_exception();\