fix(backend): add unlisted param to patch member

This commit is contained in:
sam 2024-11-25 21:24:28 +01:00
parent c0bb76580d
commit c237aa8827
Signed by: sam
GPG key ID: B4EF20DDE721CAA1

View file

@ -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}")]