fix(notifications): Adding desc order (latests first)
This commit is contained in:
@@ -8,6 +8,8 @@ async function getNotifications(req, res, next) {
|
||||
const list = await Notifications.find( {
|
||||
owner : userId,
|
||||
deleted : false
|
||||
} ).sort({
|
||||
"createdAt":'desc'
|
||||
});
|
||||
return res.send( list );
|
||||
}catch(error){
|
||||
|
||||
Reference in New Issue
Block a user