Работа над списком книг в серии
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user