Update: Video.update +watchedDates

This commit is contained in:
Yûki VACHOT 2021-12-13 19:54:05 +01:00
parent 2b02e13321
commit 3c0b26e166

View file

@ -396,6 +396,9 @@ exports.update = (req, res) => {
} }
update.$push = condition; update.$push = condition;
const watchedDates = req.body.watchedDates ? req.body.watchedDates : undefined;
update.watchedDates = {watchedDates: watchedDates};
const isActive = req.body.isActive; const isActive = req.body.isActive;
if(typeof isActive !== 'undefined'){ if(typeof isActive !== 'undefined'){
condition = isActive; condition = isActive;