diff --git a/CHANGELOG.md b/CHANGELOG.md index ad5fb1872..7be0e3f82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.3.5 (2023-12-xx) +### Bug Fixes +* **core**: Fix Arbimon API path to separated the path between staging as `legacy-api` and production as `api` +* **core**: Fix logging request error on endpoint `streams/:id/detections` receiving array of objects + ## 1.3.4 (2023-12-xx) ### Bug Fixes * **core**: Fix PATCH `/users/:email` endpoint to properly update the name on Auth0 and core database diff --git a/common/middleware/logging.js b/common/middleware/logging.js index a7445760d..7aab5b169 100644 --- a/common/middleware/logging.js +++ b/common/middleware/logging.js @@ -10,7 +10,10 @@ module.exports = expressWinston.logger({ ), meta: false, msg: function (req, res) { - let body = { ...req.body } + // stream/:id/detections receive request data as array + // classifier receive request data as object + // we don't want to spread array values into single object + let body = Array.isArray(req.body) ? req.body : { ...req.body } // shorten long detections body request if (/streams\/([a-zA-Z]|\d)+\/detections/.test(req.url) && req.body.length > 5) { const totalLength = body.length