Browse Source

用户排序

charles_c 8 months ago
parent
commit
d160b20254
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/app/api/user/route.js

+ 1 - 1
src/app/api/user/route.js

@@ -70,7 +70,7 @@ export async function GET(request) {
           },
           },
         },
         },
       },
       },
-      { $sort: { sortOrder: 1, createdAt: 1 } },
+      { $sort: { sortOrder: 1, createdAt: -1 } },
       { $skip: skip },
       { $skip: skip },
       { $limit: pageSize },
       { $limit: pageSize },
     ]);
     ]);