Update: Video.update +watchedDates
This commit is contained in:
parent
2b02e13321
commit
3c0b26e166
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Reference in a new issue