mirror of
https://github.com/discourse/discourse.git
synced 2025-08-21 19:11:18 +08:00
FEATURE: View flags grouped by topic
This commit is contained in:
parent
bbbd974487
commit
40eba8cd93
27 changed files with 347 additions and 79 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue