🐛 Fix friendship wrong preload

This commit is contained in:
LittleSheep 2024-04-06 01:47:40 +08:00
parent 3a323d5fd5
commit e7e86fa7c6

View File

@ -14,6 +14,8 @@ func ListFriend(anyside models.Account, status models.FriendshipStatus) ([]model
Where(&models.AccountFriendship{Status: status}).
Where(&models.AccountFriendship{AccountID: anyside.ID}).
Or(&models.AccountFriendship{RelatedID: anyside.ID}).
Preload("Account").
Preload("Related").
Find(&relationships).Error; err != nil {
return relationships, err
}