diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-07-03 01:51:02 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-07-03 01:51:02 +1000 |
commit | 28510f23bd69acb9a1344f70368c783f8bd03f26 (patch) | |
tree | 9124869a0d06bb60aa21d5b435da7873678b07a5 | |
parent | Perhaps a better nickname change implementation (diff) | |
download | server-28510f23bd69acb9a1344f70368c783f8bd03f26.tar.xz |
Revert "Perhaps a better nickname change implementation"
This reverts commit b3ec0ccba3acbcb40d5a01014fd304e0b99c37ef.
-rw-r--r-- | api/src/routes/guilds/#guild_id/members/#member_id/index.ts | 5 |
1 files changed, 1 insertions, 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(); |