Работа над списком книг в серии

This commit is contained in:
Book Pauk
2022-10-10 17:02:58 +07:00
parent ec96d4af39
commit 0e2ef4133e
6 changed files with 139 additions and 10 deletions

View File

@@ -79,6 +79,8 @@ class WebSocketController {
await this.search(req, ws); break;
case 'get-book-list':
await this.getBookList(req, ws); break;
case 'get-series-book-list':
await this.getSeriesBookList(req, ws); break;
case 'get-genre-tree':
await this.getGenreTree(req, ws); break;
case 'get-book-link':
@@ -150,6 +152,15 @@ class WebSocketController {
this.send(result, req, ws);
}
async getSeriesBookList(req, ws) {
if (!utils.hasProp(req, 'seriesId'))
throw new Error(`seriesId is empty`);
const result = await this.webWorker.getSeriesBookList(req.seriesId);
this.send(result, req, ws);
}
async getGenreTree(req, ws) {
const result = await this.webWorker.getGenreTree();