|
|
@ -82,7 +82,7 @@ func InsertFriendApplication(friendRequest *db.FriendRequest) error {
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
t := dbConn.Debug().Table("friend_requests").Select("*").Updates(*friendRequest)
|
|
|
|
t := dbConn.Debug().Table("friend_requests").Where("from_user_id = ? and to_user_id = ?", friendRequest.FromUserID, friendRequest.ToUserID).Select("*").Updates(*friendRequest)
|
|
|
|
if t.RowsAffected == 0 {
|
|
|
|
if t.RowsAffected == 0 {
|
|
|
|
return utils.Wrap(errors.New("RowsAffected == 0"), "no update")
|
|
|
|
return utils.Wrap(errors.New("RowsAffected == 0"), "no update")
|
|
|
|
}
|
|
|
|
}
|
|
|
|