internal Vault DeleteOneVault(int id, string userInfoId) { Vault current = GetOneVault(id); if (current == null) { throw new SystemException("Invalid Id: This vault does not exist or the wrong Id was passed in the delete request."); } if (current.CreatorId != userInfoId) { throw new SystemException("You are not the creator of this vault therefore you do not have permission to delete this."); } return(_vrepo.DeleteOneVault(id)); }