mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-22 02:12:40 +01:00
fix: self nick change response
This commit is contained in:
parent
64c233b84c
commit
246e80c095
@ -27,7 +27,9 @@ router.patch(
|
||||
route({
|
||||
requestBody: "MemberNickChangeSchema",
|
||||
responses: {
|
||||
200: {},
|
||||
200: {
|
||||
body: "APIPublicMember",
|
||||
},
|
||||
400: {
|
||||
body: "APIErrorResponse",
|
||||
},
|
||||
@ -48,7 +50,13 @@ router.patch(
|
||||
perms.hasThrow(permissionString);
|
||||
|
||||
await Member.changeNickname(member_id, guild_id, req.body.nick);
|
||||
res.status(200).send();
|
||||
|
||||
const member = await Member.findOne({
|
||||
where: { id: member_id, guild_id },
|
||||
relations: ["roles"],
|
||||
});
|
||||
|
||||
res.send(member?.toPublicMember());
|
||||
},
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user