From f712bcbdc1548e3c974751090bc026fff91abcde Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Tue, 8 Sep 2015 12:25:30 -0300 Subject: [PATCH] api: fix article children pagination --- lib/noosfero/api/v1/articles.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/noosfero/api/v1/articles.rb b/lib/noosfero/api/v1/articles.rb index 4869569..fec1944 100644 --- a/lib/noosfero/api/v1/articles.rb +++ b/lib/noosfero/api/v1/articles.rb @@ -142,13 +142,13 @@ module Noosfero {:vote => vote.save} end - paginate per_page: MAX_PER_PAGE, max_per_page: MAX_PER_PAGE desc 'Return the children of a article identified by id' do detail 'Get all children articles of a specific article' params Noosfero::API::Entities::Article.documentation failure [[403, 'Forbidden']] named 'ArticleChildren' end + paginate per_page: MAX_PER_PAGE, max_per_page: MAX_PER_PAGE get ':id/children' do article = find_article(environment.articles, params[:id]) @@ -164,7 +164,7 @@ module Noosfero end Article.hit(articles) - present articles, :with => Entities::Article, :fields => params[:fields] + present_articles_paginated(articles) end desc 'Return one child of a article identified by id' do -- libgit2 0.21.2