1
0
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:
Cyber 2024-09-03 14:13:52 +02:00
parent 64c233b84c
commit 246e80c095

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