Работа над проектом
This commit is contained in:
@@ -70,6 +70,8 @@ class WebSocketController {
|
||||
await this.search(req, ws); break;
|
||||
case 'get-book-list':
|
||||
await this.getBookList(req, ws); break;
|
||||
case 'get-genre-tree':
|
||||
await this.getGenreTree(req, ws); break;
|
||||
|
||||
default:
|
||||
throw new Error(`Action not found: ${req.action}`);
|
||||
@@ -133,6 +135,12 @@ class WebSocketController {
|
||||
|
||||
this.send(result, req, ws);
|
||||
}
|
||||
|
||||
async getGenreTree(req, ws) {
|
||||
const result = await this.webWorker.getGenreTree();
|
||||
|
||||
this.send(result, req, ws);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = WebSocketController;
|
||||
|
||||
Reference in New Issue
Block a user