public string Delete(int id, string userId) { Vault vault = Get(id, userId); _repo.Delete(id); return("Successfully deleted"); }
internal string Delete(int id) { if (_repo.Delete(id)) { return("Vault successfully removed."); } throw new Exception("Could not delete vault"); }
public void Delete(int id, string userId) { int i = _repo.Delete(id, userId); if (i == 0) { throw new Exception("You can't do that."); } }
internal object Delete(int id, string userId) { Vault foundVault = GetById(id, userId); if (_repo.Delete(id, userId)) { return("Deleted!"); } throw new Exception("errrrr"); }
// NOTE Delete Request internal bool Delete(int id, string userId) { Vault foundVault = GetVaultById(id); if (foundVault.UserId != userId) { throw new Exception("Not your Vault!"); } return(_repo.Delete(id, userId)); }
public string Delete(string userId, int id) { bool deleted = _repo.Delete(userId, id); if (!deleted) { throw new Exception("Sorry You No Own This!"); } return("Deleted!"); }
internal string Delete(string userId, int id) { var exists = _repo.GetById(userId, id); if (exists == null) { throw new Exception("Invalid Id"); } _repo.Delete(userId, id); return("Successfully Deleted"); }
internal string Delete(int id) { var exists = _repo.GetById(id); if (exists == null) { throw new Exception("Invalid Id"); } _repo.Delete(id); return("Mamba Out"); }
internal string Delete(int id) { var Current = _repo.GetById(id); if (Current == null) { throw new Exception("Invalid ID"); } _repo.Delete(id); return("Successfully Deleted"); }
public string Delete(string userId, int id) { GetById(id, userId); bool delorted = _repo.Delete(userId, id); if (!delorted) { throw new Exception("Not the author of Vault!"); } return("Vault Deleted!"); }
public string Delete(int id, string userId) { Vault exists = _vr.Get(id); if (exists == null || exists.UserId != userId) { throw new Exception("Invalid Id"); } _vr.Delete(id); return(" unkept man"); }
public String Delete(int id, string userId) { Vault exists = GetById(id); bool vaultDeleted = _repo.Delete(id, userId); if (!vaultDeleted) { throw new Exception("Cannot Delete Vault"); } return("Vault Deleted"); }
public string Delete(int id, string userId) { Vault exists = _repo.GetById(id); if (exists == null || exists.UserId != userId) { throw new Exception("doesn't exist broh"); } _repo.Delete(id); return("it's gone, Jim"); }
public string Delete(string userId, int id) { //GetById(id); bool deleted = _repo.Delete(userId, id); if (!deleted) { throw new Exception("You are not the creator of this vault!"); } return("Deleted!"); }
internal string Delete(int id, string userId) { var exists = _repo.GetVaultDeleteById(id, userId); if (exists == null) { throw new Exception("Invalid Id"); } _repo.Delete(id, userId); return("Successfully Deleted"); }
internal string Delete(int id) { var exists = _repo.GetById(id); if (exists == null) { throw new Exception("INVALID ID"); } _repo.Delete(id); return("successfully Deleted"); }
internal string Delete(int id, string userId) { Vault data = GetById(id, userId); if (data.CreatorId != userId) { throw new Exception("Invalid Edit Permissions, This Vault isn't yours to delete."); } _vaultsRepo.Delete(id); return("Vault Removed;"); }
internal object Delete(int id) { var existenceTest = _repo.GetById(id); if (existenceTest == null) { throw new Exception("Bad request or Id"); } _repo.Delete(id); return("Yay you deleted it"); }
public String Delete(string userId, int id) { GetByVaultId(id, userId); bool delorted = _repo.Delete(userId, id); if (!delorted) { throw new Exception("Not your vault to delete"); } return("Deleted!"); }
// internal Vault Edit(Vault update) // { // var found = _repo.GetById(update.Id); // if (found == null) { throw new Exception("Invalid Id Bro"); } // _repo.Edit(update); // return update; // } internal String Delete(int id, string userId) { var found = _repo.GetById(id); if (found == null) { throw new Exception("Invalid Id"); } _repo.Delete(id, userId); return("Successfully Deleted"); }
internal string Delete(int id) { var exists = _repo.GetById(id); if (exists == null) { throw new Exception("Invalid id."); } _repo.Delete(id); return("Successfully deleted"); }
internal string Delete(int id, Profile userInfo) { var data = GetById(id, userInfo); if (data.CreatorId != userInfo.Id) { throw new Exception("You must own this Vault to delete it."); } _repo.Delete(id); return("Successfully Deleted"); }
internal string Delete(int id, string userId) { var exists = _vaultRepo.GetById(id); if (exists.UserId != userId) { throw new Exception("not your vault to delete"); } _vaultRepo.Delete(id); return("Vault has been deleted!"); }
internal object Delete(string userId, int id) { GetById(userId, id); bool deleted = _repo.Delete(userId, id); if (!deleted) { throw new Exception("You can't delete a Vault you don't own!"); } return("Deleted!"); }
internal object Delete(int id, string userId) { Vault exists = _repo.GetById(id, userId); if (exists == null) { throw new Exception("Invalid Id or You Did Not Create This Vault"); } _repo.Delete(id, userId); return("Successfully Deleted"); }
internal string Delete(int id, string userId) { // Vault foundVault = GetById(id); // if (foundVault.UserId != userId ) // { // throw new Exception("This is not your Vault!"); // } if (_repo.Delete(id, userId)) { return("Successfully deleted"); } throw new Exception("Something didn't work"); }
}//endof edit internal Vault Delete(int id, string userId) { Vault found = Get(id); if (found.UserId != userId) { throw new Exception("Invalid Request"); } if (_repo.Delete(id)) { return found; } throw new Exception("Something went terribly wrong"); }
internal string Delete(int id, string userId) { Vault foundVault = GetById(id); if (foundVault.UserId != userId) { throw new Exception("Not your vault or profile for that matter"); } if (_repo.Delete(id, userId)) { return("Successfully deleted!"); } throw new Exception("We have no idea how you frigged up this bad"); }
internal Vault Delete(int id, string userId) { Vault found = Get(id, userId); if (found.UserId != userId) { throw new Exception("Invalid Request"); } if (_repo.Delete(id)) { return(found); } throw new Exception("Something bad happened"); }
public Vault Delete(int id, string UserId) { Vault found = GetOne(id, UserId); if (found.UserId != UserId) { throw new Exception("Invalid Request"); } if (_repo.Delete(id)) { return(found); } throw new Exception("Something went very wrong"); }