public void DeletePost(int id) { bool authorIsCaller = IsPostAuthorMatch <bool> .Execute(new { post.Author }); if (authorIsCaller) { DeletePostCommand.Execute(new { Id = id }); } }
public void EditPost(Post post) { bool authorIsCaller = IsPostAuthorMatch <bool> .Execute(new { post.Author }); if (authorIsCaller) { EditPostCommand.Execute(new { post.Content }); } }
public void EditPost(Post post) { bool authorIsCaller = IsPostAuthorMatch <bool> .Execute(new { post.Author }); if (authorIsCaller) { EditPostCommand.Execute(new { post.Content }); var hash = HashObject(post).ToHexString(); Connector connector = new Connector(credentialManager.PublicKey, credentialManager.PrivateKey); connector.Call("editPostHash", post.Id, hash); } }