From e9b1bccbc9b9f8ad6680ac32202c52ef0b8b458f Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Tue, 22 Mar 2022 16:08:16 +0000 Subject: [PATCH] Fix schema for the `parents` field --- src/routes/api.cr | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/routes/api.cr b/src/routes/api.cr index 8543740..281577c 100644 --- a/src/routes/api.cr +++ b/src/routes/api.cr @@ -44,10 +44,13 @@ struct APIRouter desc: "An entry in a book" Koa.schema "title", { - "mtime" => Int64, - "entries" => ["entry"], - "titles" => ["title"], - "parents" => [String], + "mtime" => Int64, + "entries" => ["entry"], + "titles" => ["title"], + "parents" => [{ + "title" => String, + "id" => String, + }], "title_percentages" => [Float64?], "entry_percentages" => [Float64?], }.merge(s %w(dir title id display_name cover_url)),