public async Task <IActionResult> GetUsersForInteract([FromRoute] string username) { var userRole = HttpContext.User.Claims.FirstOrDefault(x => x.Type == "Role").Value.ToString(); if (userRole != "admin") { return(Forbid()); } var response = await _clientDataService.GetUsersForInteractAsync(username); if (response == null) { return(BadRequest("User not found")); } if (response.Count() > 0) { return(Ok(response)); } else { return(BadRequest("Users for interact not found")); } }