mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-08 03:42:34 +01:00
Update members.ts
This commit is contained in:
parent
a05dd51a2f
commit
20a4b326f2
@ -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);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user