Просмотр исходного кода

fix: ensure sorting by updatedAt in recent threads pagination

Shun Miyazawa 9 месяцев назад
Родитель
Сommit
1082fa0e8f
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      apps/app/src/features/openai/server/routes/get-recent-threads.ts

+ 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 });