mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Add back Admin::GroupsController#index
route for now.
* The endpoint is being used by discourse_api.
This commit is contained in:
parent
be30d4510a
commit
33e22cf598
1 changed files with 14 additions and 0 deletions
|
@ -1,4 +1,18 @@
|
|||
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
|
||||
render nothing: true
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue