Ejemplo n.º 1
0
        public IHttpActionResult Cancel(int id)
        {
            var user = User.Identity;

            if (!_ideaRepository.CancelIdea(id, user))
            {
                return(BadRequest());
            }

            return(Ok());
        }
Ejemplo n.º 2
0
        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"));
        }