1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-23 19:02:37 +01:00

Get messages by ascending order

This commit is contained in:
Madeline 2022-07-22 22:11:02 +10:00
parent c1cf07d7ce
commit f3c6b7d7a1
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47

View File

@ -102,7 +102,7 @@ router.get("/", async (req: Request, res: Response) => {
if (!permissions.has("READ_MESSAGE_HISTORY")) return res.json([]);
var query: FindManyOptions<Message> & { where: { id?: any; }; } = {
order: { id: "DESC" },
order: { id: "ASC" },
take: limit,
where: { channel_id },
relations: ["author", "webhook", "application", "mentions", "mention_roles", "mention_channels", "sticker_items", "attachments"]