feat(apiv2): actually add UUIDs to JSON models

This commit is contained in:
spiral 2021-10-12 04:25:06 -04:00
parent 9d47bfe0d8
commit 11620d94c8
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31
3 changed files with 12 additions and 3 deletions

View File

@ -66,6 +66,7 @@ namespace PluralKit.Core
var o = new JObject();
o.Add("id", group.Hid);
o.Add("uuid", group.Uuid.ToString());
o.Add("name", group.Name);
if (systemStr != null)

View File

@ -112,10 +112,15 @@ namespace PluralKit.Core
var o = new JObject();
o.Add("id", member.Hid);
o.Add("name", member.NameFor(ctx));
if (systemStr != null && v == APIVersion.V2)
if (v == APIVersion.V2)
{
o.Add("uuid", member.Uuid.ToString());
if (systemStr != null)
o.Add("system", systemStr);
}
o.Add("name", member.NameFor(ctx));
// o.Add("color", member.ColorPrivacy.CanAccess(ctx) ? member.Color : null);
o.Add("color", member.Color);

View File

@ -70,6 +70,9 @@ namespace PluralKit.Core
{
var o = new JObject();
o.Add("id", system.Hid);
if (v == APIVersion.V2)
o.Add("uuid", system.Uuid.ToString());
o.Add("name", system.Name);
o.Add("description", system.DescriptionFor(ctx));
o.Add("tag", system.Tag);