mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-23 15:13:05 +00:00
Assert that emoji being updated belongs to the requested guild
This commit is contained in:
1 parent
49c21fb71c
commit
6da128bdfd
1 file changed
+4
@@ -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