diff --git a/src/api/game/api.rs b/src/api/game/api.rs index 422984c..3ed645d 100644 --- a/src/api/game/api.rs +++ b/src/api/game/api.rs @@ -143,7 +143,7 @@ impl Api { } let user_id = r.user_id.unwrap_or(0); - let url = r.url.unwrap_or("".to_string()); + let url = r.url.unwrap_or_else(|| "".to_string()); let balance = r.balance.unwrap_or(0.00); Ok(models::GetGameUrlResponse { diff --git a/src/services/game/service.rs b/src/services/game/service.rs index bbf4c66..f5bc6d6 100644 --- a/src/services/game/service.rs +++ b/src/services/game/service.rs @@ -290,7 +290,7 @@ impl Service { nickname: m.member.nickname.clone(), site_username: m.member.username.clone(), group_key: m.member.parent_member.map(|p| p.username.clone()), - amount: m.balance_sum, + amount: 0.0, request_key: None, }; let res = self.game_api.get_game_url(req).await.map_err(|e| {