Merge branch 'feature-unfriendly-methods' of https://github.com/PretendoNetwork/friends-secure into feature-unfriendly-methods

This commit is contained in:
light 2023-04-01 18:30:06 -04:00
commit d90bd745d9
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ func GetUserFriends(pid uint32) []*nexproto.FriendRelationship {
friendRelationships := make([]*nexproto.FriendRelationship, 0)
rows, err := database.Postgres.Query(`
SELECT user2_pid, type FROM "3ds".friendships WHERE user1_pid=$1 AND type=1`, pid)
SELECT user2_pid, type FROM "3ds".friendships WHERE user1_pid=$1 AND type=1 LIMIT 100`, pid)
if err != nil && err != sql.ErrNoRows {
globals.Logger.Critical(err.Error())
}

View File

@ -15,7 +15,7 @@ import (
func GetUserFriendList(pid uint32) []*nexproto.FriendInfo {
friendList := make([]*nexproto.FriendInfo, 0)
rows, err := database.Postgres.Query(`SELECT user2_pid, date FROM wiiu.friendships WHERE user1_pid=$1 AND active=true`, pid)
rows, err := database.Postgres.Query(`SELECT user2_pid, date FROM wiiu.friendships WHERE user1_pid=$1 AND active=true LIMIT 100`, pid)
if err != nil {
globals.Logger.Critical(err.Error())
return friendList