Commit f712bcbdc1548e3c974751090bc026fff91abcde
1 parent
8cffa2cb
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
api: fix article children pagination
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
lib/noosfero/api/v1/articles.rb
... | ... | @@ -142,13 +142,13 @@ module Noosfero |
142 | 142 | {:vote => vote.save} |
143 | 143 | end |
144 | 144 | |
145 | - paginate per_page: MAX_PER_PAGE, max_per_page: MAX_PER_PAGE | |
146 | 145 | desc 'Return the children of a article identified by id' do |
147 | 146 | detail 'Get all children articles of a specific article' |
148 | 147 | params Noosfero::API::Entities::Article.documentation |
149 | 148 | failure [[403, 'Forbidden']] |
150 | 149 | named 'ArticleChildren' |
151 | 150 | end |
151 | + paginate per_page: MAX_PER_PAGE, max_per_page: MAX_PER_PAGE | |
152 | 152 | get ':id/children' do |
153 | 153 | article = find_article(environment.articles, params[:id]) |
154 | 154 | |
... | ... | @@ -164,7 +164,7 @@ module Noosfero |
164 | 164 | end |
165 | 165 | |
166 | 166 | Article.hit(articles) |
167 | - present articles, :with => Entities::Article, :fields => params[:fields] | |
167 | + present_articles_paginated(articles) | |
168 | 168 | end |
169 | 169 | |
170 | 170 | desc 'Return one child of a article identified by id' do | ... | ... |