mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 16:29:32 +08:00
DEV: move post flags into database (#27125)
This is preparation for a feature that will allow admins to define their custom flags. Current behaviour should stay untouched.
This commit is contained in:

committed by
GitHub

parent
312a930ac8
commit
cfbbfd177c
@ -350,13 +350,6 @@ class SiteSerializer < ApplicationSerializer
|
||||
private
|
||||
|
||||
def ordered_flags(flags)
|
||||
notify_moderators_type = PostActionType.flag_types[:notify_moderators]
|
||||
types = flags
|
||||
|
||||
if notify_moderators_flag = types.index(notify_moderators_type)
|
||||
types.insert(types.length, types.delete_at(notify_moderators_flag))
|
||||
end
|
||||
|
||||
types.map { |id| PostActionType.new(id: id) }
|
||||
flags.map { |id| PostActionType.new(id: id) }
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user