We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 143cbf2 + ff1ed0d commit 64c233bCopy full SHA for 64c233b
src/api/routes/guilds/#guild_id/emojis.ts
@@ -123,13 +123,13 @@ router.post(
123
if (body.require_colons == null) body.require_colons = true;
124
125
const user = await User.findOneOrFail({ where: { id: req.user_id } });
126
- body.image = (await handleFile(`/emojis/${id}`, body.image)) as string;
+ await handleFile(`/emojis/${id}`, body.image);
127
128
const mimeType = body.image.split(":")[1].split(";")[0];
129
const emoji = await Emoji.create({
130
id: id,
131
guild_id: guild_id,
132
- ...body,
+ name: body.name,
133
require_colons: body.require_colons ?? undefined, // schema allows nulls, db does not
134
user: user,
135
managed: false,
0 commit comments