fix: magvar used for BE calls

fix: unit summary labels
This commit is contained in:
Davide Passoni
2024-12-12 16:43:24 +01:00
parent 89abcb3330
commit 8006d639ae
19 changed files with 159 additions and 146 deletions

View File

@@ -22,7 +22,7 @@ module.exports = function () {
res.send(response[0].audioContent);
res.end()
}
).catch((error) => res.sendStatus(400));
).catch((error) => res.sendStatus(404));
});
router.put("/recognize", (req, res, next) => {
@@ -46,7 +46,7 @@ module.exports = function () {
.map((result) => result.alternatives[0].transcript)
.join("\n");
res.send(transcription)
}).catch((error) => res.sendStatus(400));
}).catch((error) => res.sendStatus(404));
});
return router;

View File

@@ -138,7 +138,7 @@ module.exports = function (configLocation) {
sessionData = {};
res.sendStatus(404);
} else {
res.send(sessionData[req.params.profileName]);
res.send(sessionData[req.params.profileName] ?? {});
res.end();
}
});