11
This commit is contained in:
@@ -87,7 +87,12 @@ impl MaterialStore {
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn delete(&self, id: i64) -> Result<Option<String>, String> {
|
||||
pub async fn get(&self, id: i64) -> Result<Option<MaterialRecord>, String> {
|
||||
self.with_db(move |db| db.get(id).map_err(|e| e.to_string()))
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn delete(&self, id: i64) -> Result<bool, String> {
|
||||
self.with_db(move |db| db.delete(id).map_err(|e| e.to_string()))
|
||||
.await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user