server: sort search results

This commit is contained in:
Max Leiter 2022-03-24 18:28:41 -07:00
parent a61f2c00e2
commit bb893fa6ba
No known key found for this signature in database
GPG key ID: A3512F2F2F17EBDA

View file

@ -169,7 +169,9 @@ posts.get("/search",
as: "files",
attributes: ["id", "title"]
}
]
],
attributes: ["id", "title", "visibility", "createdAt"],
order: [["createdAt", "DESC"]]
})
res.json(posts)