Exemplo n.º 1
0
 public ActionResult <string> Delete(int id)
 {
     if (_repo.DeleteVault(id, HttpContext.User.Identity.Name))
     {
         return(Ok("Successfully Deleted vault"));
     }
     return(BadRequest("Unable to Delete Vault"));
 }
Exemplo n.º 2
0
        public ActionResult <string> Delete(int vaultid)
        {
            var id = HttpContext.User.Identity.Name;

            if (_repo.DeleteVault(vaultid, id))
            {
                return(Ok("Successfully Deleted!"));
            }
            return(BadRequest("Unable to delete!"));
        }
Exemplo n.º 3
0
        public ActionResult <Vault> Delete(int id)
        {
            var CurrentUserId = HttpContext.User.Identity.Name;

            if (_vaultRepo.DeleteVault(CurrentUserId, id))
            {
                return(Ok("success"));
            }
            return(NotFound("No Vault Found"));
        }
Exemplo n.º 4
0
        public string DeleteVault(int id)
        {
            var  user   = HttpContext.User.Identity.Name;
            bool delete = _db.DeleteVault(id, user);

            if (delete)
            {
                return("Successfully Deleted!");
            }
            return("An Error Occurred!");
        }
Exemplo n.º 5
0
 public bool DeleteVault(int id)
 {
     return(_db.DeleteVault(id));
 }
Exemplo n.º 6
0
 public void Delete(int id)
 {
     db.DeleteVault(id);
 }
Exemplo n.º 7
0
 public void Delete(int id, string authorId)
 {
     _db.DeleteVault(id, authorId);
 }