mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
Add back Admin::GroupsController#index
route for now.
* The endpoint is being used by discourse_api.
This commit is contained in:
@ -1,4 +1,18 @@
|
|||||||
class Admin::GroupsController < Admin::AdminController
|
class Admin::GroupsController < Admin::AdminController
|
||||||
|
def index
|
||||||
|
groups = Group.order(:name).where("groups.id <> ?", Group::AUTO_GROUPS[:everyone])
|
||||||
|
|
||||||
|
if search = params[:search].to_s
|
||||||
|
groups = groups.where("name ILIKE ?", "%#{search}%")
|
||||||
|
end
|
||||||
|
|
||||||
|
if params[:ignore_automatic].to_s == "true"
|
||||||
|
groups = groups.where(automatic: false)
|
||||||
|
end
|
||||||
|
|
||||||
|
render_serialized(groups, BasicGroupSerializer)
|
||||||
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
render nothing: true
|
render nothing: true
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user