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

            _db.DeleteKeep(id, AuthorId);
        }
Beispiel #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"));
 }
Beispiel #3
0
 public ActionResult <string> DeleteKeep(int id)
 {
     if (_kr.DeleteKeep(id))
     {
         return(Ok());
     }
     return(BadRequest("Unable to delete this keep"));
 }
 public ActionResult <string> Delete(int id)
 {
     if (_repo.DeleteKeep(id))
     {
         return(Ok("Successfully Deleted!"));
     }
     return(BadRequest("Unable to Delete!"));
 }
Beispiel #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!"));
        }
Beispiel #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!";
 }
Beispiel #7
0
        public ActionResult <string> DeleteKeep(int id)
        {
            var userId = HttpContext.User.Identity.Name;

            if (_repo.DeleteKeep(id, userId))
            {
                return(Ok("deleted"));
            }
            return(BadRequest());
        }
Beispiel #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"));
        }
        public string DeleteKeep(int id)
        {
            var  user   = HttpContext.User.Identity.Name;
            bool delete = _db.DeleteKeep(id, user);

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