diff --git a/src/library/entry.cr b/src/library/entry.cr index 3a4748c..16666ea 100644 --- a/src/library/entry.cr +++ b/src/library/entry.cr @@ -49,6 +49,7 @@ abstract class Entry json.field "err_msg", err_msg end json.field "zip_path", path # for API backward compatability + json.field "path", path json.field "title_id", @book.id json.field "title_title", @book.title json.field "sort_title", sort_title diff --git a/src/routes/api.cr b/src/routes/api.cr index 509f13d..89b4a30 100644 --- a/src/routes/api.cr +++ b/src/routes/api.cr @@ -40,7 +40,7 @@ struct APIRouter Koa.schema "entry", { "pages" => Int32, "mtime" => Int64, - }.merge(s %w(path title size id title_id display_name cover_url)), + }.merge(s %w(zip_path path title size id title_id display_name cover_url)), desc: "An entry in a book" Koa.schema "title", {