Exemplo n.º 1
0
        public async Task <IActionResult> GetOne(string id, string localeId)
        {
            _logger.Info("Getting App with Id = {id}", id);
            var result = await _appRepository.GetOneAsync(id);

            _logger.Info("Found app: {@result}", result);

            var languageKeys = await _localizationRepository.GetAppLangues(id, localeId);

            if (languageKeys != null && languageKeys.Any())
            {
                TranslateApp(result, languageKeys);
            }
            if (result == null)
            {
                return(NotFound());
            }

            return(Ok(result));
        }