This commit is contained in:
syuilo 2017-01-17 11:11:22 +09:00
parent caa8aee7a0
commit 9f81288fcc
48 changed files with 91 additions and 140 deletions

View file

@ -44,14 +44,13 @@ module.exports = (params) =>
const favorites = await Favorites
.find({
user_id: user._id
}, {}, {
}, {
limit: limit,
skip: offset,
sort: {
_id: sort == 'asc' ? 1 : -1
}
})
.toArray();
});
// Serialize
res(await Promise.all(favorites.map(async favorite =>