Skip to content

Commit

Permalink
Merge pull request #86 from starknet-id/fix/get_completed_quests-outp…
Browse files Browse the repository at this point in the history
…ut-format

fix: get_completed_quests output format
  • Loading branch information
Th0rgal authored Oct 3, 2023
2 parents f6ee702 + 2c2a032 commit c317e55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/endpoints/get_completed_quests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ pub async fn handler(
let tasks_collection = state.db.collection::<Document>("completed_tasks");
match tasks_collection.aggregate(pipeline, None).await {
Ok(mut cursor) => {
let mut quests: Vec<Document> = Vec::new();
let mut quests: Vec<u32> = 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()
}
Expand Down

0 comments on commit c317e55

Please sign in to comment.