🐛 Fix bugs on relationship api
This commit is contained in:
parent
27276c66c5
commit
700c818df8
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user