2022-06-13 10:26:49 +00:00
|
|
|
json.payload do
|
|
|
|
json.array! @articles, partial: 'article', as: :article
|
|
|
|
end
|
2022-07-28 08:29:16 +00:00
|
|
|
|
|
|
|
json.meta do
|
2022-10-21 20:43:15 +00:00
|
|
|
json.all_articles_count @portal_articles.size
|
2022-09-27 19:35:53 +00:00
|
|
|
json.archived_articles_count @articles.archived.size
|
2022-10-21 20:43:15 +00:00
|
|
|
json.articles_count @articles_count
|
|
|
|
json.current_page @current_page
|
|
|
|
json.draft_articles_count @all_articles.draft.size
|
|
|
|
json.mine_articles_count @all_articles.search_by_author(current_user.id).size if current_user.present?
|
2022-09-27 19:35:53 +00:00
|
|
|
json.published_count @articles.published.size
|
2022-07-28 08:29:16 +00:00
|
|
|
end
|