This commit is contained in:
Jan Prochazka
2020-05-01 14:11:47 +02:00
parent bfef6b57dd
commit 3e07c2b76e
5 changed files with 40 additions and 8 deletions

View File

@@ -28,7 +28,8 @@ module.exports = {
test(req, res) {
const subprocess = fork(process.argv[1], ['connectProcess']);
subprocess.on('message', (resp) => {
const { msgtype } = res;
// @ts-ignore
const { msgtype } = resp;
if (msgtype == 'connected' || msgtype == 'error') {
res.json(resp);
}