public IActionResult GetDemo(DemoLanguage language, string categoryName, string demoName) { var demo = _demoContainer.GetDemo(language, categoryName, demoName); if (demo == null) { return(NotFound()); } var dto = DemoDto.FromModel(demo); dto.StudioUrl = GetStudioUrl(demo); return(Ok(dto)); }
public IActionResult GetDemo(DemoLanguage language, string categoryName, string demoName) { try { var demo = _demoContainer.GetDemo(language, categoryName, demoName); var dto = DemoDto.FromModel(demo); dto.StudioUrl = GetStudioUrl(demo); return(Ok(dto)); } catch (InvalidOperationException e) { _logger.LogError(e, "An error occured during demo fetching."); return(NotFound()); } }