public IActionResult ActivateOffer(Guid id) { if (!_offerService.CheckIfOfferExists(id)) { return(NotFound()); } var offer = _offerService.ActivateOffer(id); return(Ok(offer)); }
public async Task <IActionResult> Activate(string id) { _offerService.ActivateOffer(id); var offer = await _offerService.GetOfferAsync(id); var activatedOfferDto = _mapper.Map <OfferDto>(offer); activatedOfferDto.Images = CreateUrlsToPhotos(offer.Images); return(Ok(activatedOfferDto)); }
public ActionResult ActivateOffer(string id) { _offer.ActivateOffer(id); return(RedirectToAction("Campaign")); }