fix: correctly parse member data as v2 model in POST /members
This commit is contained in:
parent
99a9ec7928
commit
6919d10953
@ -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…
Reference in New Issue
Block a user