diff --git a/server/routes/api-snapshots.js b/server/routes/api-snapshots.js index 2b746d8..9e207b1 100644 --- a/server/routes/api-snapshots.js +++ b/server/routes/api-snapshots.js @@ -32,9 +32,9 @@ const SYNAPSE_QUEUE = MYQUEUES.SYNAPSE_QUEUE; */ router.put('/:id', passport.ensureAuthenticatedAndAdmin, async (req, res, next) => { try { - var body = req.body; - body.owner = req.user._id; - const result = await db.snapshot.update(req.params.id, req.body); + var patch = req.body; + patch.owner = req.user._id; + const result = await db.snapshot.update(req.params.id, patch); return res.json(result); } catch (error) { next(error);