1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-22 02:12:40 +01:00

Merge pull request #1210 from CyberL1/fix/nick-response

fix: self nick change response
This commit is contained in:
Puyodead1 2024-09-10 17:05:33 -04:00 committed by GitHub
commit 224d4020d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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());
},
);