fix: session pagination

This commit is contained in:
Chen, Tai-Lin committed 2023-12-21 16:37:37 +08:00
1 parent bc0055781e
commit 19cd10ab7b
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@ export async function sessionList({ nextKey, itemsPerPage, order }) {
let matchStage = {}
if (nextKey) {
const key = new mongoose.Types.ObjectId(nextKey)
matchStage = { user: order.matchStage(key) }
matchStage = { _id: order.matchStage(key) }
}
const sessions = await Session.aggregate([
{