mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-23 13:03:08 +00:00
fucking postgres
This commit is contained in:
7 files changed
+27
-24
No files matched your search
@@ -98,11 +98,11 @@ router.patch(
|
||||
|
||||
const guild = await Guild.findOneOrFail({
|
||||
where: { id: guild_id },
|
||||
select: { channelOrdering: true },
|
||||
select: { channel_ordering: true },
|
||||
});
|
||||
|
||||
// The channels not listed for this query
|
||||
const notMentioned = guild.channelOrdering.filter(
|
||||
const notMentioned = guild.channel_ordering.filter(
|
||||
(x) => !body.find((c) => c.id == x),
|
||||
);
|
||||
|
||||
@@ -159,7 +159,10 @@ router.patch(
|
||||
}),
|
||||
);
|
||||
|
||||
await Guild.update({ id: guild_id }, { channelOrdering: notMentioned });
|
||||
await Guild.update(
|
||||
{ id: guild_id },
|
||||
{ channel_ordering: notMentioned },
|
||||
);
|
||||
|
||||
return res.sendStatus(204);
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user