mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FEATURE: View flags grouped by topic
This commit is contained in:
@ -1,8 +1,11 @@
|
||||
module JsonError
|
||||
|
||||
def create_errors_json(obj, type = nil)
|
||||
def create_errors_json(obj, opts = nil)
|
||||
opts ||= {}
|
||||
|
||||
errors = create_errors_array obj
|
||||
errors[:error_type] = type if type
|
||||
errors[:error_type] = opts[:type] if opts[:type]
|
||||
errors[:extras] = opts[:extras] if opts[:extras]
|
||||
errors
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user