Commit 6d3c0ae191bc13ac5372a143cd64d2c292da5990
1 parent
1c395f6b
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
display articles voted by me
Showing
1 changed file
with
12 additions
and
0 deletions
Show diff stats
lib/noosfero/api/v1/articles.rb
| ... | ... | @@ -126,6 +126,18 @@ module Noosfero |
| 126 | 126 | end |
| 127 | 127 | end |
| 128 | 128 | |
| 129 | + desc "Returns the articles I voted" do | |
| 130 | + detail 'Get the Articles I make a vote' | |
| 131 | + failure [[403, 'Forbidden']] | |
| 132 | + named 'ArticleFollowers' | |
| 133 | + end | |
| 134 | + | |
| 135 | + #FIXME refactor this method | |
| 136 | + get 'voted_by_me' do | |
| 137 | + present_articles_paginated(current_person.votes.collect(&:voteable)) | |
| 138 | +# present_articles(current_person, 'following_articles') | |
| 139 | + end | |
| 140 | + | |
| 129 | 141 | desc 'Perform a vote on a article by id' do |
| 130 | 142 | detail 'Vote on a specific article with values: 1 (if you like) or -1 (if not)' |
| 131 | 143 | params Noosfero::API::Entities::UserLogin.documentation | ... | ... |