Beispiel #1
0
        public IHttpActionResult GetUserBattles()
        {
            var user = HttpContext.Current.User.Identity.GetUserId();

            if (string.IsNullOrWhiteSpace(user))
            {
                return(BadRequest("Invalid User ID"));
            }

            var allUserBattles = _battleRepository.GetAll(user);

            return(Ok(allUserBattles));
        }