fix(dashboard): order shards correctly

This commit is contained in:
alyssa 2024-12-24 04:51:26 +00:00
parent fd6909cd96
commit d1b617f6be
3 changed files with 9 additions and 7 deletions

View file

@ -23,7 +23,7 @@ pub async fn discord_state(State(ctx): State<ApiContext>) -> Json<Value> {
.map(|v| serde_json::from_str(v).expect("could not deserialize shard"))
.collect::<Vec<ShardState>>();
shard_status.sort_by(|a, b| a.shard_id.cmp(&b.shard_id));
shard_status.sort_by(|a, b| b.shard_id.cmp(&a.shard_id));
Json(json!({
"shards": shard_status,