feat: with backend
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2024-05-14 23:30:20 +02:00
parent 816869e6f9
commit 837caee5db
14 changed files with 1050 additions and 158 deletions

View File

@@ -104,7 +104,28 @@ impl Commander {
description,
state,
} => {
todo!()
let channel = self.channel.clone();
let mut client = GraphClient::new(channel);
let request = tonic::Request::new(UpdateItemRequest {
root,
path,
item: Some(ItemGraphItem {
title,
description,
item_state: Some(match state {
hyperlog_core::log::ItemState::NotDone => {
item_graph_item::ItemState::NotDone(ItemStateNotDone {})
}
hyperlog_core::log::ItemState::Done => {
item_graph_item::ItemState::Done(ItemStateDone {})
}
}),
}),
});
let response = client.update_item(request).await?;
let res = response.into_inner();
// self.engine.update_item(
// &root,
// &path.iter().map(|p| p.as_str()).collect::<Vec<_>>(),