Beispiel #1
0
        public async Task <IHttpActionResult> Login(string name)
        {
            var player = await _database.GetPlayerByNameAsync(name);

            if (player == null)
            {
                var token = await _database.AddPlayerAsync(name);

                return(Ok(token));
            }
            var oldToken = await _vault.GetGameTokenAsync(player.GameToken);

            return(Ok(oldToken));
        }