🐛 Fix friendship wrong preload
This commit is contained in:
parent
3a323d5fd5
commit
e7e86fa7c6
@ -14,6 +14,8 @@ func ListFriend(anyside models.Account, status models.FriendshipStatus) ([]model
|
|||||||
Where(&models.AccountFriendship{Status: status}).
|
Where(&models.AccountFriendship{Status: status}).
|
||||||
Where(&models.AccountFriendship{AccountID: anyside.ID}).
|
Where(&models.AccountFriendship{AccountID: anyside.ID}).
|
||||||
Or(&models.AccountFriendship{RelatedID: anyside.ID}).
|
Or(&models.AccountFriendship{RelatedID: anyside.ID}).
|
||||||
|
Preload("Account").
|
||||||
|
Preload("Related").
|
||||||
Find(&relationships).Error; err != nil {
|
Find(&relationships).Error; err != nil {
|
||||||
return relationships, err
|
return relationships, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user