Update: User.history missing sort by watchedDate
This commit is contained in:
parent
7dc6b64a3c
commit
c465b87b3f
1 changed files with 2 additions and 1 deletions
|
|
@ -457,7 +457,8 @@ exports.history = (req, res) => {
|
|||
watchedDate: {$arrayElemAt: ["$watchedDates", -1]},
|
||||
createdAt: true,
|
||||
updatedAt: true
|
||||
}}])
|
||||
}},
|
||||
{$sort: {watchedDate: -1}}])
|
||||
.then(async data => {
|
||||
let yt_results = [];
|
||||
let dm_results = [];
|
||||
|
|
|
|||
Reference in a new issue