diff --git a/src/endpoints/get_completed_quests.rs b/src/endpoints/get_completed_quests.rs index fd2efb73..28214e53 100644 --- a/src/endpoints/get_completed_quests.rs +++ b/src/endpoints/get_completed_quests.rs @@ -78,9 +78,9 @@ pub async fn handler( let tasks_collection = state.db.collection::("completed_tasks"); match tasks_collection.aggregate(pipeline, None).await { Ok(mut cursor) => { - let mut quests: Vec = Vec::new(); + let mut quests: Vec = Vec::new(); while let Some(result) = cursor.try_next().await.unwrap() { - quests.push(result); + quests.push(result.get("quest_id").unwrap().as_i32().unwrap() as u32); } (StatusCode::OK, Json(quests)).into_response() }