public async Task <IActionResult> GetInterectedUsers([FromRoute] string username) { var userNameFromJwt = HttpContext.User.Claims.FirstOrDefault(x => x.Type == "UserName").Value.ToString(); var userRole = HttpContext.User.Claims.FirstOrDefault(x => x.Type == "Role").Value.ToString(); if (username == userNameFromJwt || userRole == "admin") { var response = await _clientDataService.GetInteractedUsersAsync(username); if (response == null) { return(BadRequest("User not found or user have not interected users")); } return(Ok(response)); } else { return(Forbid()); } }