Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Commit

Permalink
Add author promote percent to votes of API discussion. #1380
Browse files Browse the repository at this point in the history
  • Loading branch information
maslenitsa93 committed Aug 18, 2019
1 parent a6a7b09 commit 7b7109d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions libraries/api/discussion_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
3 changes: 2 additions & 1 deletion libraries/api/include/golos/api/vote_state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ namespace golos { namespace api {
uint64_t weight = 0;
int64_t rshares = 0;
int16_t percent = 0;
int16_t author_promote_percent = 0;
fc::optional<share_type> reputation;
time_point_sec time;
};

} } // golos::api


FC_REFLECT((golos::api::vote_state), (voter)(weight)(rshares)(percent)(reputation)(time));
FC_REFLECT((golos::api::vote_state), (voter)(weight)(rshares)(percent)(author_promote_percent)(reputation)(time));

0 comments on commit 7b7109d

Please sign in to comment.