Ejemplo n.º 1
0
        public async Task <ActionResult> Get(string userIdOrMe, string gameId)
        {
            var userId   = GetUserIdFromParam(userIdOrMe);
            var dataInfo = await _gameDataService.GetDataInfo(userId, gameId);

            if (dataInfo == null)
            {
                return(NotFound());
            }
            var fetchUrl = _gameDataService.GetDataFetchUrl(userId, gameId, dataInfo.CurrentIndex);
            var response = new GetResponse
            {
                DataInfo = dataInfo,
                Url      = fetchUrl,
            };

            return(Ok(response));
        }