public async Task <IActionResult> GetUserById(string userId)
        {
            var users = _userGetter.GetUserByIds(new List <string> {
                userId
            });

            if (users == null || !users.Any())
            {
                return(NotFound());
            }
            else
            {
                return(Ok(users.FirstOrDefault()));
            }
        }
示例#2
0
        public async Task <IActionResult> GetUsersByIds([FromBody] string[] usersIds)
        {
            var users = _userGetter.GetUserByIds(usersIds.ToList());

            return(Ok(users));
        }