mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
short sessions in descendent date
This commit is contained in:
parent
b383012162
commit
1c7e7ef601
@ -13,7 +13,9 @@ export default class SessionController extends Controller {
|
||||
fn: async (req, res) => {
|
||||
// get current session _id
|
||||
const { _id } = req.user
|
||||
|
||||
const sessions = await Session.find({ user_id: _id }, { token: 0 })
|
||||
.sort({ date: -1 })
|
||||
|
||||
return res.json(sessions)
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user