feat(apiv2): stubs
This commit is contained in:
@@ -37,32 +37,4 @@ namespace PluralKit.API
|
||||
return Ok(o);
|
||||
}
|
||||
}
|
||||
|
||||
public static class MetaJsonExt
|
||||
{
|
||||
public static JArray ToJSON(this IEnumerable<PKShardInfo> shards)
|
||||
{
|
||||
var o = new JArray();
|
||||
|
||||
foreach (var shard in shards)
|
||||
{
|
||||
var s = new JObject();
|
||||
s.Add("id", shard.Id);
|
||||
|
||||
if (shard.Status == PKShardInfo.ShardStatus.Down)
|
||||
s.Add("status", "down");
|
||||
else
|
||||
s.Add("status", "up");
|
||||
|
||||
s.Add("ping", shard.Ping);
|
||||
s.Add("last_heartbeat", shard.LastHeartbeat.ToString());
|
||||
s.Add("last_connection", shard.LastConnection.ToString());
|
||||
|
||||
o.Add(s);
|
||||
}
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user