public async Task <IActionResult> AcceptRequestFriend(string PotentialFriendName) { long?UserID = await accountService.GetUserID(User.Identity.Name); long?PotentialFriendID = await accountService.GetUserID(PotentialFriendName); if ((UserID != null) && (PotentialFriendID != null)) { await Task.Run(() => actionService.AcceptRequestFriend((long)UserID, (long)PotentialFriendID)); return(RedirectToAction("Index", "Home")); } return(StatusCode(500)); }