server: sort search results
This commit is contained in:
parent
a61f2c00e2
commit
bb893fa6ba
1 changed files with 3 additions and 1 deletions
|
@ -169,7 +169,9 @@ posts.get("/search",
|
||||||
as: "files",
|
as: "files",
|
||||||
attributes: ["id", "title"]
|
attributes: ["id", "title"]
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
attributes: ["id", "title", "visibility", "createdAt"],
|
||||||
|
order: [["createdAt", "DESC"]]
|
||||||
})
|
})
|
||||||
|
|
||||||
res.json(posts)
|
res.json(posts)
|
||||||
|
|
Loading…
Reference in a new issue