public IActionResult Tracker(string?id, Database.Campaign model) { if (!String.IsNullOrEmpty(model.OriginalBat)) { model.TrackedBat = Campaign.TrackContent(model.OriginalBat, model.Domain, model.DynamicField, true, model.Name, model._id); model.Save(); } return(RedirectToAction("Tracker", new { id = model._id })); }
public IActionResult Create(Database.Campaign newCampaign) { if (string.IsNullOrEmpty(newCampaign.Name)) { newCampaign.Domain = this.Request.HttpContext.Request.Host.ToString(); return(View(newCampaign)); } else { if (newCampaign.Save()) { return(RedirectToAction("Index")); } else { return(View(newCampaign)); } } }