1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-07 19:32:34 +01:00

Update members.ts

This commit is contained in:
Intevel ツ 2021-05-08 13:53:39 +02:00
parent a05dd51a2f
commit 20a4b326f2

View File

@ -99,9 +99,6 @@ router.patch("/members/@me/nick", async (req: Request, res: Response) => {
const perms = await getPermission(member_id, guild_id);
perms.hasThrow("CHANGE_NICKNAME");
const member = await MemberModel.findOne({ id: req.user_id }).exec();
if (!member) throw new HTTPError("Member not found", 404);
await changeNickname(member_id, guild_id, req.body.nickname);
res.status(204);
});