Updated logging
Moved images to use static files Got login working with demo user.
This commit is contained in:
@@ -56,21 +56,21 @@ namespace Microsoft.eShopWeb.Controllers
|
||||
return View(vm);
|
||||
}
|
||||
|
||||
[HttpGet("[controller]/pic/{id}")]
|
||||
public IActionResult GetImage(int id)
|
||||
{
|
||||
byte[] imageBytes;
|
||||
try
|
||||
{
|
||||
imageBytes = _imageService.GetImageBytesById(id);
|
||||
}
|
||||
catch (CatalogImageMissingException ex)
|
||||
{
|
||||
_logger.LogWarning($"No image found for id: {id}");
|
||||
return NotFound();
|
||||
}
|
||||
return File(imageBytes, "image/png");
|
||||
}
|
||||
//[HttpGet("[controller]/pic/{id}")]
|
||||
//public IActionResult GetImage(int id)
|
||||
//{
|
||||
// byte[] imageBytes;
|
||||
// try
|
||||
// {
|
||||
// imageBytes = _imageService.GetImageBytesById(id);
|
||||
// }
|
||||
// catch (CatalogImageMissingException ex)
|
||||
// {
|
||||
// _logger.LogWarning($"No image found for id: {id}");
|
||||
// return NotFound();
|
||||
// }
|
||||
// return File(imageBytes, "image/png");
|
||||
//}
|
||||
|
||||
|
||||
public IActionResult Error()
|
||||
|
||||
Reference in New Issue
Block a user