Fix API pagination issue (#97)

* Fix API pagination issue
This commit is contained in:
Ben Halpern 2018-03-18 12:34:06 -04:00 committed by GitHub
parent 7f788fb940
commit 3fd1232b7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,14 +35,14 @@ class ArticleApiIndexService
includes(:user).
order("published_at DESC").
page(page).
per(30)
per(num)
elsif organization = Organization.find_by_slug(username)
organization.articles.
where(published: true).
includes(:user).
order("published_at DESC").
page(page).
per(30)
per(num)
else
not_found
end