Улучшение работы RemoteLib.downloadInpxFile

This commit is contained in:
Book Pauk
2022-10-15 20:59:42 +07:00
parent 0894a38978
commit 9aa9261b6a
5 changed files with 38 additions and 20 deletions

View File

@@ -1,4 +1,3 @@
const fs = require('fs-extra');
const _ = require('lodash');
const WebSocket = require ('ws');
@@ -182,9 +181,9 @@ class WebSocketController {
if (!this.config.allowRemoteLib)
throw new Error('Remote lib access disabled');
const data = await fs.readFile(this.config.inpxFile, 'base64');
const result = await this.webWorker.getInpxFile(req);
this.send({data}, req, ws);
this.send(result, req, ws);
}
}