|
|
@ -49,12 +49,12 @@ func GetFriendListByUserID(OwnerUserID string) ([]db.Friend, error) {
|
|
|
|
return friends, nil
|
|
|
|
return friends, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func GetFriendIDListByUserID(OwnerUserID string) ([]string, error) {
|
|
|
|
func GetFriendIDListByUserID(OwnerUserID string) ([]*string, error) {
|
|
|
|
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
|
|
|
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var friendIDList []string
|
|
|
|
var friendIDList []*string
|
|
|
|
err = dbConn.Table("friends").Select("friend_user_id").Where("owner_user_id=?", OwnerUserID).Find(&friendIDList).Error
|
|
|
|
err = dbConn.Table("friends").Select("friend_user_id").Where("owner_user_id=?", OwnerUserID).Find(&friendIDList).Error
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|