Exemplo n.º 1
0
        public IActionResult GetUser(Guid id, [FromQuery] bool expand)
        {
            var user = _repository.GetUser(id, expand);

            if (user == null)
            {
                return(NotFound());
            }

            if (expand)
            {
                return(Ok(Mapper.Map <UserWithPlaylists>(user)));
            }

            return(Ok(Mapper.Map <User>(user)));
        }