Return member after create/edit
Changing the POST and PATCH routes to return the member that's been created/edited, similar to how it worked before. Makes it easier to compare changes and get a newly created member's ID
This commit is contained in:
parent
59dbc5368b
commit
ef68a5250f
@ -66,7 +66,7 @@ namespace PluralKit.API.Controllers
|
|||||||
member.Suffix = newMember.Suffix;
|
member.Suffix = newMember.Suffix;
|
||||||
await _members.Save(member);
|
await _members.Save(member);
|
||||||
|
|
||||||
return Ok();
|
return Ok(member);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPatch("{hid}")]
|
[HttpPatch("{hid}")]
|
||||||
@ -107,7 +107,7 @@ namespace PluralKit.API.Controllers
|
|||||||
member.Suffix = newMember.Suffix;
|
member.Suffix = newMember.Suffix;
|
||||||
await _members.Save(member);
|
await _members.Save(member);
|
||||||
|
|
||||||
return Ok();
|
return Ok(member);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user