diff --git a/server/src/routes/posts.ts b/server/src/routes/posts.ts index 77ae39b4..740776f9 100644 --- a/server/src/routes/posts.ts +++ b/server/src/routes/posts.ts @@ -169,7 +169,9 @@ posts.get("/search", as: "files", attributes: ["id", "title"] } - ] + ], + attributes: ["id", "title", "visibility", "createdAt"], + order: [["createdAt", "DESC"]] }) res.json(posts)