Skip to content

Commit

Permalink
Merge pull request #72 from starknet-id/feat/implement_achievements
Browse files Browse the repository at this point in the history
fix: add missing img_url in UserAchievement
  • Loading branch information
Th0rgal authored Aug 23, 2023
2 parents cc49507 + fe8f6ee commit 31fb4e3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion config.template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ image_for_layout = "/example/one.webp"
[starkscan]
api_key = "xxxxxx"


[achievements]
[achievements.braavos]
contract = "0x00057c4b510d66eb1188a7173f31cccee47b9736d40185da8144377b896d5ff3"
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/achievements/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ pub async fn handler(
]
},
"completed": { "$ne": [{ "$size": "$achieved" }, 0] },
"verify_type": "$achievement.verify_type"
"verify_type": "$achievement.verify_type",
"img_url": "$achievement.img_url"
}
}
},
Expand Down
1 change: 1 addition & 0 deletions src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ pub_struct!(Debug, Serialize, Deserialize; UserAchievement {
desc: String,
completed: bool,
verify_type: String,
img_url: String,
});

pub_struct!(Debug, Serialize, Deserialize; NftBalance {
Expand Down

0 comments on commit 31fb4e3

Please sign in to comment.