From fe8f6eebb0521888f26923911e06b56d8dc4bc42 Mon Sep 17 00:00:00 2001 From: Iris Date: Tue, 22 Aug 2023 15:47:40 +0200 Subject: [PATCH] fix: add img_url in UserAchievementDocument --- config.template.toml | 1 - src/endpoints/achievements/fetch.rs | 3 ++- src/models.rs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config.template.toml b/config.template.toml index d3794b7b..e08ccc39 100644 --- a/config.template.toml +++ b/config.template.toml @@ -77,7 +77,6 @@ image_for_layout = "/example/one.webp" [starkscan] api_key = "xxxxxx" - [achievements] [achievements.braavos] contract = "0x00057c4b510d66eb1188a7173f31cccee47b9736d40185da8144377b896d5ff3" diff --git a/src/endpoints/achievements/fetch.rs b/src/endpoints/achievements/fetch.rs index 19568bd0..7c389e6c 100644 --- a/src/endpoints/achievements/fetch.rs +++ b/src/endpoints/achievements/fetch.rs @@ -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" } } }, diff --git a/src/models.rs b/src/models.rs index c425f39f..bfc0cfd4 100644 --- a/src/models.rs +++ b/src/models.rs @@ -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 {