Merge remote-tracking branch 'origin/tuoyun' into tuoyun

pull/141/head
Gordon 3 years ago
commit 1539c0b2f2

@ -82,7 +82,7 @@ func InsertFriendApplication(friendRequest *db.FriendRequest) error {
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 {
return utils.Wrap(errors.New("RowsAffected == 0"), "no update")
}

Loading…
Cancel
Save