Restructure omni services and add Chatwoot research snapshot
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
json.id article.id
|
||||
json.category_id article.category_id
|
||||
json.title article.title
|
||||
json.content article.content
|
||||
json.description article.description
|
||||
json.status article.status
|
||||
json.account_id article.account_id
|
||||
json.last_updated_at article.updated_at
|
||||
json.views article.views
|
||||
|
||||
if article.author.present?
|
||||
json.author do
|
||||
json.partial! 'public/api/v1/models/hc/author', formats: [:json], resource: article.author
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,3 @@
|
||||
json.available_name resource.available_name
|
||||
json.name resource.name
|
||||
json.thumbnail resource.avatar_url
|
||||
@@ -0,0 +1,22 @@
|
||||
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
|
||||
|
||||
json.categories do
|
||||
if portal.categories.any?
|
||||
json.array! portal.categories.each do |category|
|
||||
json.partial! 'public/api/v1/models/category', formats: [:json], category: category
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
json.logo portal.file_base_data if portal.logo.present?
|
||||
|
||||
json.meta do
|
||||
json.articles_count portal.articles.published.size
|
||||
json.categories_count portal.categories.size
|
||||
json.default_locale portal.default_locale
|
||||
end
|
||||
Reference in New Issue
Block a user