feat(apiv2): reorganize controllers, add stats to meta endpoint

This commit is contained in:
spiral
2021-10-15 07:08:41 -04:00
parent 8fe688e4aa
commit 2bf1617737
6 changed files with 68 additions and 58 deletions

View File

@@ -35,6 +35,19 @@ namespace PluralKit.API
return o;
}
public static JObject ToJson(this ModelRepository.Counts counts)
{
var o = new JObject();
o.Add("system_count", counts.SystemCount);
o.Add("member_count", counts.MemberCount);
o.Add("group_count", counts.GroupCount);
o.Add("switch_count", counts.SwitchCount);
o.Add("message_count", counts.MessageCount);
return o;
}
}
public struct FrontersReturnNew