diff --git a/client/components/Search/AuthorList/AuthorList.vue b/client/components/Search/AuthorList/AuthorList.vue index 620fcb1..7008e7b 100644 --- a/client/components/Search/AuthorList/AuthorList.vue +++ b/client/components/Search/AuthorList/AuthorList.vue @@ -104,10 +104,10 @@ -
+
diff --git a/server/core/DbSearcher.js b/server/core/DbSearcher.js index 4f64639..8c67fdc 100644 --- a/server/core/DbSearcher.js +++ b/server/core/DbSearcher.js @@ -464,6 +464,21 @@ class DbSearcher { where: `@@id(${db.esc(ids.slice(offset, offset + limit))})` }); + //для title восстановим books + if (from == 'title') { + const bookIds = found.map(r => r.id); + const rows = await this.restoreBooks(from, bookIds); + const rowsMap = new Map(); + for (const row of rows) + rowsMap.set(row.id, row); + + for (const f of found) { + const b = rowsMap.get(f.id); + if (b) + f.books = b.books; + } + } + return {found, totalFound}; } finally { this.searchFlag--;