feat: Add search functionality for public portal (#5683)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Nithin David Thomas
2022-10-20 05:39:32 +05:30
committed by GitHub
parent bce0bb8acb
commit 1fb1be3ddc
16 changed files with 378 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
class Public::Api::V1::Portals::ArticlesController < PublicController
before_action :ensure_custom_domain_request, only: [:show, :index]
before_action :portal
before_action :set_category
before_action :set_category, except: [:index]
before_action :set_article, only: [:show]
layout 'portal'
@@ -20,7 +20,7 @@ class Public::Api::V1::Portals::ArticlesController < PublicController
end
def set_category
@category = @portal.categories.find_by!(slug: params[:category_slug])
@category = @portal.categories.find_by!(slug: params[:category_slug]) if params[:category_slug].present?
end
def portal