Restructure omni services and add Chatwoot research snapshot

This commit is contained in:
Ruslan Bakiev
2026-02-21 11:11:27 +07:00
parent edea7a0034
commit b73babbbf6
7732 changed files with 978203 additions and 32 deletions

View File

@@ -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

View File

@@ -0,0 +1,3 @@
json.available_name resource.available_name
json.name resource.name
json.thumbnail resource.avatar_url

View File

@@ -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