feat: Backend changes for article and categories ordering (#6655)
This commit is contained in:
@@ -8,6 +8,7 @@ class Public::Api::V1::Portals::ArticlesController < Public::Api::V1::Portals::B
|
||||
def index
|
||||
@articles = @portal.articles
|
||||
@articles = @articles.search(list_params) if list_params.present?
|
||||
@articles.order(position: :asc)
|
||||
end
|
||||
|
||||
def show; end
|
||||
|
||||
@@ -5,7 +5,7 @@ class Public::Api::V1::Portals::CategoriesController < Public::Api::V1::Portals:
|
||||
layout 'portal'
|
||||
|
||||
def index
|
||||
@categories = @portal.categories
|
||||
@categories = @portal.categories.order(position: :asc)
|
||||
end
|
||||
|
||||
def show; end
|
||||
|
||||
Reference in New Issue
Block a user