예제 #1
0
        public async Task <ActionResult> DropMyScores()
        {
            var gamerTag = User.GetGamerTag();

            if (string.IsNullOrWhiteSpace(gamerTag))
            {
                _log.LogError("user has no gamertag: '{0}'", User.GetId());
                return(BadRequest()); //TODO: return error info in body
            }

            await _store.DeleteAllScoresAsync(gamerTag);

            return(Ok());
        }
예제 #2
0
        public async Task <IActionResult> DropMyScores()
        {
            var gamerTag = User.GetGamerTag();

            if (string.IsNullOrWhiteSpace(gamerTag))
            {
                _logger.LogError("user has no gamertag: '{0}'", User.GetId());
                return(this.ValidationFailed(new ErrorDetail("gamertag", "The user doesn't have a gamertag")));
            }

            await _store.DeleteAllScoresAsync(gamerTag);

            return(Ok());
        }
예제 #3
0
        public async Task <IActionResult> DropMyScores()
        {
            var userId = User.GetId();

            if (string.IsNullOrWhiteSpace(userId))
            {
                _logger.LogError("user has no user ID");
                return(this.ValidationFailed(new ErrorDetail("userid", "The user doesn't have a userID")));
            }

            await _store.DeleteAllScoresAsync(userId);

            return(Ok());
        }