Update: User.history $last -> $arrayElemAt
This commit is contained in:
parent
3c0b26e166
commit
b10ba5890f
1 changed files with 1 additions and 1 deletions
|
|
@ -452,7 +452,7 @@ exports.history = (req, res) => {
|
|||
tags: true,
|
||||
interest: true,
|
||||
views: {$size: '$watchedDates'},
|
||||
watchedDate: {$last: "$watchedDates"},
|
||||
watchedDate: {$arrayElemAt: ["$watchedDates", -1]},
|
||||
createdAt: true,
|
||||
updatedAt: true
|
||||
}}])
|
||||
|
|
|
|||
Reference in a new issue