fix(api): order shards by ID

This commit is contained in:
spiral 2022-01-23 02:17:13 -05:00
parent bd3d9bc0d8
commit d948d445ec
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31

View File

@ -28,7 +28,7 @@ public class PrivateController: PKControllerBase
{ {
var db = _redis.Connection.GetDatabase(); var db = _redis.Connection.GetDatabase();
var redisInfo = await db.HashGetAllAsync("pluralkit:shardstatus"); var redisInfo = await db.HashGetAllAsync("pluralkit:shardstatus");
var shards = redisInfo.Select(x => Proto.Unmarshal<ShardState>(x.Value)); var shards = redisInfo.Select(x => Proto.Unmarshal<ShardState>(x.Value)).OrderBy(x => x.ShardId);
var stats = await _repo.GetStats(); var stats = await _repo.GetStats();