public ActionResult AcceptFriend(string token) { try { var result = _userService.AcceptFriendRequest(Guid.Parse(token)); UserFriendDTO res = new UserFriendDTO(); res.UserId = result.UserId; res.FriendId = result.FriendId; return(Ok(res)); } catch (ArgumentException e) { _logger.LogInformation(e.Message); return(NotFound(e)); } }
public string CreateUserFriend(UserDTO user, UserFriendDTO friend, string comment) { return("ok"); }
public void UpdeteOrCreate(UserFriendDTO entity) => UserFriendRepository.UpdateOrCreate(DTOMapper.MapperFromDTOToEFObject.Map <UserFriend>(entity));
public void Remove(UserFriendDTO entity) => UserFriendRepository.Delete(DTOMapper.MapperFromDTOToEFObject.Map <UserFriend>(entity));