Работа над проектом

This commit is contained in:
Book Pauk
2022-08-31 18:51:31 +07:00
parent 9aae057f32
commit 77938aac04
9 changed files with 328 additions and 8 deletions

View File

@@ -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;