This commit is contained in:
JMARyA 2024-09-21 01:49:56 +02:00
parent 30b6f6a7b3
commit 7de6d6bf7b
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263

View file

@ -1,4 +1,4 @@
use mongod::Model; use mongod::{Model, Referencable};
use crate::item::Item; use crate::item::Item;
@ -30,7 +30,7 @@ impl ItemDB {
.documents .documents
.iter() .iter()
.map(Item::new) // <-- todo : performance? .map(Item::new) // <-- todo : performance?
.find(|x| x.name == item) .find(|x| x.id() == item)
} }
/// Get all items /// Get all items