Przeglądaj źródła

fix: ensure sorting by updatedAt in recent threads pagination

Shun Miyazawa 10 miesięcy temu
rodzic
commit
1082fa0e8f

+ 1 - 0
apps/app/src/features/openai/server/routes/get-recent-threads.ts

@@ -53,6 +53,7 @@ export const getRecentThreadsFactory: GetRecentThreadsFactory = (crowi) => {
           {
             page: req.query.page ?? 1,
             limit: req.query.limit ?? 10,
+            sort: { updatedAt: -1 },
           },
         );
         return res.apiv3({ paginateResult });