From c237aa88278be790be482e22d4dbd7de794cd410 Mon Sep 17 00:00:00 2001 From: sam Date: Mon, 25 Nov 2024 21:24:28 +0100 Subject: [PATCH] fix(backend): add unlisted param to patch member --- Foxnouns.Backend/Controllers/MembersController.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Foxnouns.Backend/Controllers/MembersController.cs b/Foxnouns.Backend/Controllers/MembersController.cs index 968b571..42b8ee5 100644 --- a/Foxnouns.Backend/Controllers/MembersController.cs +++ b/Foxnouns.Backend/Controllers/MembersController.cs @@ -164,6 +164,9 @@ public class MembersController( member.Links = req.Links ?? []; } + if (req.HasProperty(nameof(req.Unlisted))) + member.Unlisted = req.Unlisted ?? false; + if (req.Names != null) { errors.AddRange( @@ -244,6 +247,7 @@ public class MembersController( public Pronoun[]? Pronouns { get; init; } public Field[]? Fields { get; init; } public Snowflake[]? Flags { get; init; } + public bool? Unlisted { get; init; } } [HttpDelete("/api/v2/users/@me/members/{memberRef}")]