From d6206772f9336818b2c10da2ce7c7df92431711f Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sun, 3 Jul 2022 01:51:02 +1000 Subject: Revert "Perhaps a better nickname change implementation" This reverts commit ca703955e209aebebf84f2fa09699809e7fd9d5b. --- api/src/routes/guilds/#guild_id/members/#member_id/index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/api/src/routes/guilds/#guild_id/members/#member_id/index.ts b/api/src/routes/guilds/#guild_id/members/#member_id/index.ts index 9b6465f6..2ff89eae 100644 --- a/api/src/routes/guilds/#guild_id/members/#member_id/index.ts +++ b/api/src/routes/guilds/#guild_id/members/#member_id/index.ts @@ -35,10 +35,7 @@ router.patch("/", route({ body: "MemberChangeSchema" }), async (req: Request, re member.roles = body.roles.map((x) => new Role({ id: x })); // foreign key constraint will fail if role doesn't exist } - if ('nick' in body) { - permission.hasThrow("CHANGE_NICKNAME"); - Member.changeNickname(member.id, member.guild.id, body.nick!); - } + if (body.nick) member.nick = body.nick; await member.save(); -- cgit 1.4.1