chore: Improve Helpcenter custom domains (#5456)

- Support rendering articles over frontend URL
- Support rendering articles over help center URL
- Support rendering help center home page in the custom domain root
This commit is contained in:
Sojan Jose
2022-09-20 06:06:01 +05:30
committed by GitHub
parent a773ad7d08
commit 99de8f4500
10 changed files with 35 additions and 23 deletions

View File

@@ -1,13 +1,13 @@
class Public::Api::V1::PortalsController < PublicController
before_action :ensure_custom_domain_request, only: [:show]
before_action :set_portal
before_action :portal
layout 'portal'
def show; end
private
def set_portal
@portal = @portals.find_by!(slug: params[:slug], archived: false)
def portal
@portal ||= Portal.find_by!(slug: params[:slug], archived: false)
end
end