mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-25 11:43:07 +01:00
Merge pull request #1210 from CyberL1/fix/nick-response
fix: self nick change response
This commit is contained in:
commit
224d4020d0
@ -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