Commit b86d064d7fc88c6ac99940b33450b4ba1d73c593
1 parent
5d5e8706
Exists in
master
and in
11 other branches
Fix api url for results
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
js/main.js
| ... | ... | @@ -169,7 +169,7 @@ function loadRandomProposal(topic_id, private_token) { |
| 169 | 169 | if($('.results-container').is(":visible")) { |
| 170 | 170 | $('.results-container .loading').show(); |
| 171 | 171 | $('.results-container .results-content').hide(); |
| 172 | - var url = host + '/api/v1/articles/' + topic_id + '/children' + '?private_token=' + private_token + '&limit=10&fields=id,name,abstract,votes_for,votes_against&content_type=ProposalsDiscussionPlugin::Proposal'; | |
| 172 | + var url = host + '/api/v1/articles/' + topic_id + '/children' + '?private_token=' + private_token + '&limit=10&order=votes_score&fields=id,name,abstract,votes_for,votes_against&content_type=ProposalsDiscussionPlugin::Proposal'; | |
| 173 | 173 | $.getJSON(url).done(function( data ) { |
| 174 | 174 | $('.results-container').html(resultsTemplate(data)); |
| 175 | 175 | $('.results-container .loading').hide(); | ... | ... |