Exemplo n.º 1
0
        public void Delete(int id)
        {
            var user     = HttpContext.User;
            var AuthorId = user.Identity.Name;

            _db.DeleteKeep(id, AuthorId);
        }
Exemplo n.º 2
0
 public ActionResult <string> Delete(int id)
 {
     if (_repo.DeleteKeep(id, HttpContext.User.Identity.Name))
     {
         return(Ok("Successfully Deleted"));
     }
     return(BadRequest("Unable to Delete"));
 }
Exemplo n.º 3
0
 public ActionResult <string> DeleteKeep(int id)
 {
     if (_kr.DeleteKeep(id))
     {
         return(Ok());
     }
     return(BadRequest("Unable to delete this keep"));
 }
Exemplo n.º 4
0
 public ActionResult <string> Delete(int id)
 {
     if (_repo.DeleteKeep(id))
     {
         return(Ok("Successfully Deleted!"));
     }
     return(BadRequest("Unable to Delete!"));
 }
Exemplo n.º 5
0
        public ActionResult <string> Delete(int keepid)
        {
            var id = HttpContext.User.Identity.Name;

            if (_repo.DeleteKeep(keepid, id))
            {
                return(Ok("Successfully Deleted"));
            }
            return(BadRequest("Unable to Delete!"));
        }
Exemplo n.º 6
0
 public string DeleteKeep(int id)
 {
     var user = HttpContext.User.Identity.Name;
     bool delete = _db.DeleteKeep(id, user);
     if (delete)
     {
         return "This Has Been Successfully Deleted!";
     }
     return "Error Occurred!";
 }
Exemplo n.º 7
0
        public ActionResult <string> DeleteKeep(int id)
        {
            var userId = HttpContext.User.Identity.Name;

            if (_repo.DeleteKeep(id, userId))
            {
                return(Ok("deleted"));
            }
            return(BadRequest());
        }
Exemplo n.º 8
0
        public ActionResult <Keep> Delete(int id)
        {
            var CurrentUserId = HttpContext.User.Identity.Name;

            if (_keepRepo.DeleteKeep(CurrentUserId, id))
            {
                return(Ok("Success"));
            }
            return(NotFound("No keep found"));
        }
Exemplo n.º 9
0
        public string DeleteKeep(int id)
        {
            var  user   = HttpContext.User.Identity.Name;
            bool delete = _db.DeleteKeep(id, user);

            if (delete)
            {
                return("Successfully Deleted");
            }
            return("Invalid");
        }
Exemplo n.º 10
0
 public bool DeleteKeep(int id)
 {
     return(_db.DeleteKeep(id));
 }