feat: add function to store item meta values
This commit is contained in:
committed by
Andrew Phillips (aider)
parent
a549fd6271
commit
4c8c6569a9
@@ -104,6 +104,22 @@ pub fn get_digest_type_meta(digest_type: DigestType) -> String {
|
||||
format!("digest_{}", digest_type.to_string().to_lowercase())
|
||||
}
|
||||
|
||||
pub fn store_item_meta_value(
|
||||
conn: &mut Connection,
|
||||
item: Item,
|
||||
meta_name: String,
|
||||
meta_value: String,
|
||||
) -> Result<(), anyhow::Error> {
|
||||
// Save digest to meta
|
||||
let meta = Meta {
|
||||
id: item.id.unwrap(),
|
||||
name: meta_name,
|
||||
value: meta_value,
|
||||
};
|
||||
store_meta(conn, meta)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn store_item_digest_value(
|
||||
conn: &mut Connection,
|
||||
item: Item,
|
||||
|
||||
Reference in New Issue
Block a user