feat: Fetching the portal data related to a specific custom domain (#5249)

This commit is contained in:
Tejaswini Chile
2022-09-07 12:22:24 +05:30
committed by GitHub
parent 6574407636
commit db73d033b7
11 changed files with 74 additions and 35 deletions

View File

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