feat: with_members query string on /systems/:ref/members endpoint

This commit is contained in:
spiral
2021-11-01 00:12:11 -04:00
parent 8d02af7b94
commit 44ccf01f93
5 changed files with 47 additions and 18 deletions

View File

@@ -61,7 +61,7 @@ namespace PluralKit.Core
public static string? IconFor(this PKGroup group, LookupContext ctx) =>
group.IconPrivacy.Get(ctx, group.Icon?.TryGetCleanCdnUrl());
public static JObject ToJson(this PKGroup group, LookupContext ctx, string? systemStr = null, bool isExport = false)
public static JObject ToJson(this PKGroup group, LookupContext ctx, string? systemStr = null, bool needsMembersArray = false)
{
var o = new JObject();
@@ -80,7 +80,7 @@ namespace PluralKit.Core
o.Add("created", group.Created.FormatExport());
if (isExport)
if (needsMembersArray)
o.Add("members", new JArray());
if (ctx == LookupContext.ByOwner)