fix: set DESC order

This commit is contained in:
CyberL1 authored and Rory& committed 2025-09-29 18:32:21 +02:00
1 parent 9662b587e3
commit 6bf4109465
2 files changed
+4

No files matched your search

@@ -58,6 +58,7 @@ router.put(
const pinned_count = await Message.count({
where: { channel: { id: channel_id }, pinned_at: Not(IsNull()) },
order: { pinned_at: "DESC" },
});
const { maxPins } = Config.get().limits.channel;
@@ -184,6 +185,7 @@ router.get(
const pins = await Message.find({
where: { channel_id: channel_id, pinned_at: Not(IsNull()) },
relations: ["author"],
order: { pinned_at: "DESC" },
});
const items = pins.map((message: Message) => ({
@@ -59,6 +59,7 @@ router.put(
const pinned_count = await Message.count({
where: { channel: { id: channel_id }, pinned_at: Not(IsNull()) },
order: { pinned_at: "DESC" },
});
const { maxPins } = Config.get().limits.channel;
@@ -185,6 +186,7 @@ router.get(
const pins = await Message.find({
where: { channel_id: channel_id, pinned_at: Not(IsNull()) },
relations: ["author"],
order: { pinned_at: "DESC" },
});
res.send(pins);