mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
fix: correctly parse member data as v2 model in POST /members
This commit is contained in:
parent
99a9ec7928
commit
6919d10953
1 changed files with 1 additions and 1 deletions
|
|
@ -43,7 +43,7 @@ public class MemberControllerV2: PKControllerBase
|
|||
if (memberCount >= memberLimit)
|
||||
throw Errors.MemberLimitReached;
|
||||
|
||||
var patch = MemberPatch.FromJSON(data);
|
||||
var patch = MemberPatch.FromJSON(data, APIVersion.V2);
|
||||
patch.AssertIsValid();
|
||||
if (!patch.Name.IsPresent)
|
||||
patch.Errors.Add(new ValidationError("name", "Key 'name' is required when creating new member."));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue