mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-08 09:30:43 +01:00
Fix
This commit is contained in:
@@ -216,16 +216,16 @@ async fn get_author_books(
|
||||
b.uploaded,
|
||||
(
|
||||
SELECT
|
||||
JSONB_AGG(
|
||||
JSONB_BUILD_OBJECT(
|
||||
'id', authors.id,
|
||||
'first_name', authors.first_name,
|
||||
'last_name', authors.last_name,
|
||||
'middle_name', authors.middle_name,
|
||||
'annotation_exists', EXISTS(
|
||||
ARRAY_AGG(
|
||||
ROW(
|
||||
authors.id,
|
||||
authors.first_name,
|
||||
authors.last_name,
|
||||
authors.middle_name,
|
||||
EXISTS(
|
||||
SELECT * FROM author_annotations WHERE author = authors.id
|
||||
)
|
||||
)
|
||||
)::author_type
|
||||
)
|
||||
FROM translations
|
||||
JOIN authors ON authors.id = translations.author
|
||||
@@ -233,11 +233,11 @@ async fn get_author_books(
|
||||
) AS "translators!: Vec<Author>",
|
||||
(
|
||||
SELECT
|
||||
JSONB_AGG(
|
||||
JSONB_BUILD_OBJECT(
|
||||
'id', sequences.id,
|
||||
'name', sequences.name
|
||||
)
|
||||
ARRAY_AGG(
|
||||
ROW(
|
||||
sequences.id,
|
||||
sequences.name
|
||||
)::sequence_type
|
||||
)
|
||||
FROM book_sequences
|
||||
JOIN sequences ON sequences.id = book_sequences.sequence
|
||||
|
||||
Reference in New Issue
Block a user