From 7b7109d97dde2d4211a9a43996bf8581070581cc Mon Sep 17 00:00:00 2001 From: maslenitsa93 Date: Mon, 19 Aug 2019 00:50:50 +0300 Subject: [PATCH] Add author promote percent to votes of API discussion. #1380 --- libraries/api/discussion_helper.cpp | 1 + libraries/api/include/golos/api/vote_state.hpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/api/discussion_helper.cpp b/libraries/api/discussion_helper.cpp index c1fe4b5565..de748652b5 100644 --- a/libraries/api/discussion_helper.cpp +++ b/libraries/api/discussion_helper.cpp @@ -213,6 +213,7 @@ namespace golos { namespace api { vstate.weight = itr->weight; vstate.rshares = itr->vote->rshares; vstate.percent = itr->vote->vote_percent; + vstate.author_promote_percent = itr->vote->author_promote_rate; vstate.time = itr->vote->last_update; fill_reputation_(database(), vo.name, vstate.reputation); result.emplace_back(std::move(vstate)); diff --git a/libraries/api/include/golos/api/vote_state.hpp b/libraries/api/include/golos/api/vote_state.hpp index a8bd3c038d..d8beb04054 100644 --- a/libraries/api/include/golos/api/vote_state.hpp +++ b/libraries/api/include/golos/api/vote_state.hpp @@ -9,6 +9,7 @@ namespace golos { namespace api { uint64_t weight = 0; int64_t rshares = 0; int16_t percent = 0; + int16_t author_promote_percent = 0; fc::optional reputation; time_point_sec time; }; @@ -16,4 +17,4 @@ namespace golos { namespace api { } } // golos::api -FC_REFLECT((golos::api::vote_state), (voter)(weight)(rshares)(percent)(reputation)(time)); \ No newline at end of file +FC_REFLECT((golos::api::vote_state), (voter)(weight)(rshares)(percent)(author_promote_percent)(reputation)(time)); \ No newline at end of file