예제 #1
0
 public ActionResult <string> Delete([FromBody] VaultKeep vk)
 {
     if (_repo.DeleteVaultKeep(vk))
     {
         return(Ok("Successfully deleted!"));
     }
     return(BadRequest("Unable to delete!"));
 }
예제 #2
0
        // pass the vaultid and keepid instead

        public ActionResult <string> Delete(int vaultId, int keepId)
        {
            var id = HttpContext.User.Identity.Name;

            if (_vaultKeepRepo.DeleteVaultKeep(vaultId, keepId, id))
            {
                return(Ok("Successfully Deleted"));
            }
            return(BadRequest("Unable to Delete!"));
        }
예제 #3
0
        public ActionResult <string> DeleteVaultKeep(int vaultId, int keepId)
        {
            var userId = HttpContext.User.Identity.Name;

            if (_repo.DeleteVaultKeep(vaultId, keepId, userId))
            {
                return(Ok("deleted"));
            }
            return(BadRequest());
        }
예제 #4
0
        public ActionResult <string> DeleteVaultKeep([FromBody] VaultKeep vaultkeep)
        {
            var result = _repo.DeleteVaultKeep(vaultkeep);

            if (result != false)
            {
                return(Ok("Successfully deleted!"));
            }
            return(BadRequest("Unable to delete!"));
        }
예제 #5
0
        public ActionResult <string> DeleteVaultKeep([FromBody] VaultKeep vaultKeep)
        {
            var result = _vkrepo.DeleteVaultKeep(vaultKeep);

            if (result != false)
            {
                return(Ok("deleted vaultkeep"));
            }
            return(BadRequest("no vaultkeep to delete"));
        }
예제 #6
0
        public ActionResult <string> Delete(int id)
        {
            bool successful = _vkr.DeleteVaultKeep(id);

            if (!successful)
            {
                return(BadRequest());
            }
            return(Ok());
        }
예제 #7
0
        public string DeleteVaultKeep(int id)
        {
            var  user   = HttpContext.User.Identity.Name;
            bool delete = _db.DeleteVaultKeep(id, user);

            if (delete)
            {
                return("Successfully Deleted!");
            }
            return("An Error Occurred!");
        }
예제 #8
0
        public string DeleteVaultKeep(int id, int keepId)
        {
            var  user   = HttpContext.User.Identity.Name;
            bool delete = _db.DeleteVaultKeep(id, keepId);

            if (delete)
            {
                return("This Has Been Successfully Deleted!");
            }
            return("Error Occurred!");
        }
예제 #9
0
        public ActionResult <string> Delete(int vaultId, int keepId)
        {
            var userId = HttpContext.User.Identity.Name;

            // _repo.DeleteVaultKeep(id, userId);

            if (_repo.DeleteVaultKeep(vaultId, keepId, userId))
            {
                return(Ok("Successfully deleted"));
            }
            return(BadRequest("Unable to delete"));
        }
예제 #10
0
 public ActionResult <String> DeleteVaultKeep([FromBody] VaultKeep value)
 {
     try
     {
         var vaultId = value.vaultId;
         var keepId  = value.keepId;
         var userId  = HttpContext.User.FindFirstValue("Id");
         return(Ok(_repo.DeleteVaultKeep(vaultId, keepId, userId)));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }
 public int DeleteVaultKeep(string id)
 {
     return(_db.DeleteVaultKeep(id));
 }
예제 #12
0
        public void DeleteVaultKeep(int vaultId, int keepId)
        {
            var user = HttpContext.User.Identity.Name;

            _db.DeleteVaultKeep(vaultId, keepId, user);
        }