public async Task <IActionResult> CreateHero(string username)
        {
            string pattern = @"^(?=[a-zA-Z0-9\s]{4,20}$)";
            var    rx      = new Regex(pattern);

            if (rx.IsMatch(username))
            {
                Hero hero = await _heroService.GetHeroByNameAsync(username);

                if (hero == null)
                {
                    hero = await _heroService.CreateHeroAsync(username);

                    return(await TokenAsync(username));
                }
            }
            return(BadRequest(new { errorText = "Invalid username." }));
        }