mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:34:31 +08:00
FEATURE: Add non_automatic group type param to groups index API
This commit is contained in:
@ -34,6 +34,9 @@ class GroupsController < ApplicationController
|
||||
},
|
||||
automatic: Proc.new { |groups|
|
||||
groups.where(automatic: true)
|
||||
},
|
||||
non_automatic: Proc.new { |groups|
|
||||
groups.where(automatic: false)
|
||||
}
|
||||
}
|
||||
ADD_MEMBERS_LIMIT = 1000
|
||||
@ -82,6 +85,8 @@ class GroupsController < ApplicationController
|
||||
type_filters = type_filters - [:my, :owner]
|
||||
end
|
||||
|
||||
type_filters.delete(:non_automatic)
|
||||
|
||||
# count the total before doing pagination
|
||||
total = groups.count
|
||||
|
||||
|
Reference in New Issue
Block a user