예제 #1
0
        public IActionResult AcceptFriendRequest(int receiverId, int senderId)
        {
            //if (senderId != _user.Id) return Ok(new { status = false });

            if (_friendsRepository.IsFriends(receiverId, senderId) == false)
            {
                _friendsRepository.AcceptFriendRequest(senderId, receiverId);
                return(Ok(new { status = true }));
            }
            else
            {
                return(Ok(new { status = false }));
            }
        }
예제 #2
0
 /// <summary>
 /// Accept the friend request
 /// </summary>
 /// <param name="userId"></param>
 /// <param name="friendId"></param>
 /// <returns></returns>
 public bool AcceptFriendRequest(int userId, int friendId) => _repository.AcceptFriendRequest(userId, friendId);
예제 #3
0
 public bool AcceptFriendRequest(int userId, int friendId)
 {
     return(_context.AcceptFriendRequest(userId, friendId));
 }