From 6919d10953fb3c3d04d634a479d46c2ca2ad3da4 Mon Sep 17 00:00:00 2001 From: spiral Date: Sun, 28 Nov 2021 07:20:35 -0500 Subject: [PATCH] fix: correctly parse member data as v2 model in POST /members --- PluralKit.API/Controllers/v2/MemberControllerV2.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PluralKit.API/Controllers/v2/MemberControllerV2.cs b/PluralKit.API/Controllers/v2/MemberControllerV2.cs index ec858e96..75a5cd96 100644 --- a/PluralKit.API/Controllers/v2/MemberControllerV2.cs +++ b/PluralKit.API/Controllers/v2/MemberControllerV2.cs @@ -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."));