fix(database): fetch all server emojis instead of one

This commit is contained in:
Bob Bobs
2023-12-01 17:41:03 -07:00
committed by Paul Makles
parent db63ac4064
commit 25016efbc2

View File

@@ -24,13 +24,12 @@ impl AbstractEmojis for MongoDb {
async fn fetch_emoji_by_parent_id(&self, parent_id: &str) -> Result<Vec<Emoji>> { async fn fetch_emoji_by_parent_id(&self, parent_id: &str) -> Result<Vec<Emoji>> {
query!( query!(
self, self,
find_one, find,
COL, COL,
doc! { doc! {
"parent.id": parent_id "parent.id": parent_id
} }
)? )
.ok_or_else(|| create_error!(NotFound))
} }
/// Fetch emoji by their parent ids /// Fetch emoji by their parent ids