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

@@ -281,17 +281,18 @@ Rails.application.routes.draw do
end
end
end
resources :portals, only: [:show], param: :slug do
scope module: :portals do
resources :categories, only: [:index, :show], param: :slug
resources :articles, only: [:index, :show]
end
end
resources :csat_survey, only: [:show, :update]
end
end
end
get 'hc/:slug/:locale', to: 'public/api/v1/portals#show', format: 'json'
get 'hc/:slug/:locale/categories', to: 'public/api/v1/portals/categories#index', format: 'json'
get 'hc/:slug/:locale/:category_slug', to: 'public/api/v1/portals/categories#show', format: 'json'
get 'hc/:slug/:locale/:category_slug/articles', to: 'public/api/v1/portals/articles#index', format: 'json'
get 'hc/:slug/:locale/:category_slug/:id', to: 'public/api/v1/portals/articles#show', format: 'json'
# ----------------------------------------------------------------------
# Used in mailer templates
resource :app, only: [:index] do