feat: finish errorCommands pagination

This commit is contained in:
Chen, Tai-Lin committed 2023-12-21 16:31:34 +08:00
1 parent 8c634c8115
commit bc0055781e
6 files changed
+59 -41

No files matched your search

+1 -4
View File
@@ -13,7 +13,6 @@ export function userCount() {
}
export async function userList({ nextKey, itemsPerPage, order }) {
console.log(order)
let matchStage = {}
if (nextKey) {
const key = new mongoose.Types.ObjectId(nextKey)
@@ -21,9 +20,7 @@ export async function userList({ nextKey, itemsPerPage, order }) {
}
console.log(matchStage)
const users = await Session.aggregate([
{
$match: matchStage,
},
{ $match: matchStage },
{
$group: {
_id: '$user',