diff --git a/server/controllers/SessionController.js b/server/controllers/SessionController.js index 5ca694fc..4d0166a7 100644 --- a/server/controllers/SessionController.js +++ b/server/controllers/SessionController.js @@ -74,7 +74,9 @@ class SessionController { // POST: api/session/:id/close close(req, res) { - this.playbackSessionManager.closeSessionRequest(req.user, req.session, req.body, res) + let syncData = req.body + if (syncData && !Object.keys(syncData).length) syncData = null + this.playbackSessionManager.closeSessionRequest(req.user, req.session, syncData, res) } // DELETE: api/session/:id