From 700c818df82434efd8d2b84a4bdf0986baa81ed3 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Fri, 20 Jun 2025 01:26:30 +0800 Subject: [PATCH] :bug: Fix bugs on relationship api --- DysonNetwork.Sphere/Account/RelationshipController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DysonNetwork.Sphere/Account/RelationshipController.cs b/DysonNetwork.Sphere/Account/RelationshipController.cs index 2368b7e..17c9827 100644 --- a/DysonNetwork.Sphere/Account/RelationshipController.cs +++ b/DysonNetwork.Sphere/Account/RelationshipController.cs @@ -32,7 +32,7 @@ public class RelationshipController(AppDatabase db, RelationshipService rels) : var statuses = await db.AccountRelationships .Where(r => r.AccountId == userId) - .ToDictionaryAsync(r => r.AccountId); + .ToDictionaryAsync(r => r.RelatedId); foreach (var relationship in relationships) if (statuses.TryGetValue(relationship.RelatedId, out var status)) relationship.Status = status.Status;