Feature: Knowledge Base APIs (#1002)

- Introduce models & migrations for portals, categories, folders and articles
- CRUD API for portals
- CRUD API for categories

Addresses: #714

Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
Subin T P
2020-09-26 02:32:34 +05:30
committed by GitHub
parent 4b27ac63d4
commit 701eccb35c
34 changed files with 659 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
json.id category.id
json.name category.name
json.description category.description
json.position category.position
json.account_id category.account_id

View File

@@ -0,0 +1,3 @@
json.payload do
json.partial! 'category', category: @category
end

View File

@@ -0,0 +1,3 @@
json.payload do
json.array! @categories, partial: 'category', as: :category
end

View File

@@ -0,0 +1,3 @@
json.payload do
json.partial! 'category', category: @category
end

View File

@@ -0,0 +1,8 @@
json.id portal.id
json.color portal.color
json.custom_domain portal.custom_domain
json.header_text portal.header_text
json.homepage_link portal.homepage_link
json.name portal.name
json.page_title portal.page_title
json.slug portal.slug

View File

@@ -0,0 +1,3 @@
json.payload do
json.partial! 'portal', portal: @portal
end

View File

@@ -0,0 +1,3 @@
json.payload do
json.array! @portals, partial: 'portal', as: :portal
end

View File

@@ -0,0 +1,3 @@
json.payload do
json.partial! 'portal', portal: @portal
end