public ActionResult <string> Delete([FromBody] VaultKeep vk) { if (_repo.DeleteVaultKeep(vk)) { return(Ok("Successfully deleted!")); } return(BadRequest("Unable to delete!")); }
// 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!")); }
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()); }
public ActionResult <string> DeleteVaultKeep([FromBody] VaultKeep vaultkeep) { var result = _repo.DeleteVaultKeep(vaultkeep); if (result != false) { return(Ok("Successfully deleted!")); } return(BadRequest("Unable to delete!")); }
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")); }
public ActionResult <string> Delete(int id) { bool successful = _vkr.DeleteVaultKeep(id); if (!successful) { return(BadRequest()); } return(Ok()); }
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!"); }
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!"); }
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")); }
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)); }
public void DeleteVaultKeep(int vaultId, int keepId) { var user = HttpContext.User.Identity.Name; _db.DeleteVaultKeep(vaultId, keepId, user); }