fix: Remove draft articles from the help center search (#10116)
Limit the API to return only the published articles in public help center API. Fixes https://github.com/chatwoot/chatwoot/issues/10026
This commit is contained in:
@@ -6,7 +6,7 @@ class Public::Api::V1::Portals::ArticlesController < Public::Api::V1::Portals::B
|
||||
layout 'portal'
|
||||
|
||||
def index
|
||||
@articles = @portal.articles
|
||||
@articles = @portal.articles.published
|
||||
search_articles
|
||||
order_by_sort_param
|
||||
@articles.page(list_params[:page]) if list_params[:page].present?
|
||||
|
||||
Reference in New Issue
Block a user