fix update
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user