mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-03 11:25:29 -04:00
Include archive error messages in API response
This commit is contained in:
parent
c778364ca2
commit
61e85dd49f
@ -55,9 +55,12 @@ class Entry
|
|||||||
def build_json(*, slim = false)
|
def build_json(*, slim = false)
|
||||||
JSON.build do |json|
|
JSON.build do |json|
|
||||||
json.object do
|
json.object do
|
||||||
{% for str in ["zip_path", "title", "size", "id"] %}
|
{% for str in %w(zip_path title size id) %}
|
||||||
json.field {{str}}, @{{str.id}}
|
json.field {{str}}, @{{str.id}}
|
||||||
{% end %}
|
{% end %}
|
||||||
|
if err_msg
|
||||||
|
json.field "err_msg", err_msg
|
||||||
|
end
|
||||||
json.field "title_id", @book.id
|
json.field "title_id", @book.id
|
||||||
json.field "sort_title", sort_title
|
json.field "sort_title", sort_title
|
||||||
json.field "pages" { json.number @pages }
|
json.field "pages" { json.number @pages }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user