public IActionResult Details(Guid?id) { if (id == null) { return(NotFound().WithError(LOCALIZATION_ERROR_NOT_FOUND)); } try { var viewModel = _adService.GetAdAsViewModel((Guid)id); //viewModel.IsInWishlist = _wishlistService.IsInWishlist((Guid)id, CurrentUserId); return(View(viewModel)); } catch (Exception ex) { _logger.LogError(ex, ex.Message); return(NotFound(ex.Message).WithError(ex.Message)); } }
public IActionResult GetProductDetails([FromBody] AdGetModel model) { return(Ok(_adService.GetAdAsViewModel(model.id))); }