public IHttpActionResult Cancel(int id) { var user = User.Identity; if (!_ideaRepository.CancelIdea(id, user)) { return(BadRequest()); } return(Ok()); }
public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var user = User.Identity; if (!_ideaRepository.CancelIdea((int)id, user)) { return(HttpNotFound()); } return(RedirectToAction("Index")); }