mirror of
https://github.com/spacebarchat/server.git
synced 2026-07-19 11:36:16 +00:00
Assert that emoji being updated belongs to the requested guild
This commit is contained in:
@@ -159,6 +159,10 @@ router.patch(
|
||||
|
||||
if (body.name?.includes("-")) body.name = body.name?.replaceAll("-", ""); // Dashes are invalid apparently
|
||||
|
||||
await Emoji.findOneOrFail({
|
||||
where: { guild_id: guild_id, id: emoji_id },
|
||||
});
|
||||
|
||||
const emoji = await Emoji.create({
|
||||
...body,
|
||||
id: emoji_id,
|
||||
|
||||
Reference in New Issue
Block a user