fix(database): fetch all server emojis instead of one
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user