Exemple #1
0
        public async Task <IActionResult> GetGameServerGroupOngoingMatches([FromRoute] int startingIndex, [FromRoute] int pageSize, [FromRoute] Guid gameServerGroupPublicKey)
        {
            try
            {
                var matches = await service.GetGameServerGroupOngoingMatches(startingIndex, pageSize, gameServerGroupPublicKey);

                if (matches == null)
                {
                    return(Error(new ErrorResult
                    {
                        Classification = ErrorClassification.EntityNotFound,
                        Message = "Game server group not found"
                    }, HttpStatusCode.NotFound));
                }

                return(Ok(matches));
            }
            catch (Exception)
            {
                return(Error(new ErrorResult
                {
                    Classification = ErrorClassification.InternalError,
                    Message = "Failed getting game server latest match"
                }));
            }
        }