Exemplo n.º 1
0
        public async Task <IActionResult> GetGameServerGroupGameServers([FromRoute] Guid gameServerGroupPublicKey)
        {
            try
            {
                var gameServerGroupGameServers = await service.GetGameServerGroupGameServers(gameServerGroupPublicKey);

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

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