Removed GroupsController search by tag, category

• Removed:
- GroupsController search by tag, category
This commit is contained in:
Developer 2021-02-26 17:45:48 -05:00
parent f1cc618fdd
commit 10ec03f28b
1 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ class Api::V1::GroupsController < Api::BaseController
@groupCategory = nil @groupCategory = nil
if !params[:category].empty? if !params[:category].empty?
@groupCategory = GroupCategories.where("text ILIKE ?", "%#{params[:category]}%") # @groupCategory = GroupCategories.where("text ILIKE ?", "%#{params[:category]}%")
end end
@groups = [] @groups = []
@ -59,7 +59,7 @@ class Api::V1::GroupsController < Api::BaseController
@groups = [] @groups = []
if !params[:tag].empty? if !params[:tag].empty?
@groups = Group.where(is_archived: false).where("array_to_string(tags, '||') ILIKE :tag", tag: "%#{params[:tag]}%").order('member_count DESC').all # @groups = Group.where(is_archived: false).where("array_to_string(tags, '||') ILIKE :tag", tag: "%#{params[:tag]}%").order('member_count DESC').all
end end
render json: @groups, each_serializer: REST::GroupSerializer render json: @groups, each_serializer: REST::GroupSerializer