示例#1
0
        public async Task <IActionResult> AddFriend(Guid userId, Guid friendId)
        {
            var added = await friendsService.AddFriendAsync(userId, friendId);

            if (added)
            {
                return(Ok());
            }

            return(BadRequest());
        }
示例#2
0
 public void AddFriend(AddRemoveFriendModel model)
 {
     _friendsService.AddFriendAsync(model.UserId, model.FriendId);
 }