Добавлена заготовка для seriesSearch
This commit is contained in:
@@ -76,6 +76,8 @@ class WebSocketController {
|
||||
await this.getWorkerState(req, ws); break;
|
||||
case 'author-search':
|
||||
await this.authorSearch(req, ws); break;
|
||||
case 'series-search':
|
||||
await this.seriesSearch(req, ws); break;
|
||||
case 'get-author-book-list':
|
||||
await this.getAuthorBookList(req, ws); break;
|
||||
case 'get-series-book-list':
|
||||
@@ -142,6 +144,15 @@ class WebSocketController {
|
||||
this.send(result, req, ws);
|
||||
}
|
||||
|
||||
async seriesSearch(req, ws) {
|
||||
if (!req.query)
|
||||
throw new Error(`query is empty`);
|
||||
|
||||
const result = await this.webWorker.seriesSearch(req.query);
|
||||
|
||||
this.send(result, req, ws);
|
||||
}
|
||||
|
||||
async getAuthorBookList(req, ws) {
|
||||
const result = await this.webWorker.getAuthorBookList(req.authorId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user