feat: revert to sqlite

This commit is contained in:
2024-04-14 09:05:46 +07:00
parent ed6aca41ea
commit e3ede34108
4 changed files with 119 additions and 159 deletions

View File

@@ -188,11 +188,12 @@ pub async fn set_nstore(
let tag = Tag::Identifier(key.into());
let builder = EventBuilder::new(Kind::ApplicationSpecificData, content, vec![tag]);
if let Ok(event_id) = client.send_event_builder(builder).await {
println!("set nstore: {}", event_id);
Ok(event_id)
} else {
Err("Event has been published failled".into())
match client.send_event_builder(builder).await {
Ok(event_id) => {
println!("set nstore: {}", event_id);
Ok(event_id)
}
Err(err) => Err(err.to_string()),
}
}