2020-09-25 21:02:34 +00:00
|
|
|
json.custom_domain portal.custom_domain
|
|
|
|
json.header_text portal.header_text
|
|
|
|
json.homepage_link portal.homepage_link
|
|
|
|
json.name portal.name
|
|
|
|
json.page_title portal.page_title
|
|
|
|
json.slug portal.slug
|
2022-07-05 11:45:38 +00:00
|
|
|
|
|
|
|
json.categories do
|
|
|
|
if portal.categories.any?
|
|
|
|
json.array! portal.categories.each do |category|
|
2022-10-06 00:24:34 +00:00
|
|
|
json.partial! 'public/api/v1/models/category', formats: [:json], category: category
|
2022-07-05 11:45:38 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2022-07-28 08:29:16 +00:00
|
|
|
|
|
|
|
json.meta do
|
|
|
|
json.articles_count portal.articles.published.size
|
|
|
|
json.categories_count portal.categories.size
|
|
|
|
json.default_locale portal.default_locale
|
|
|
|
end
|