bug fixed

This commit is contained in:
병준 박 2022-09-05 13:39:30 +00:00
parent 3a203ad2db
commit b142831820
4 changed files with 4 additions and 10 deletions

View File

@ -36,7 +36,7 @@ pub struct Betting {
#[serde(rename = "groupKey")] #[serde(rename = "groupKey")]
pub group_key: Option<String>, pub group_key: Option<String>,
/// 게임 데이터 /// 게임 데이터
pub detail: Option<serde_json::value::Value>, pub detail: Option<Box<serde_json::value::RawValue>>,
/// 보너스 여부 /// 보너스 여부
#[serde(rename = "isBonus")] #[serde(rename = "isBonus")]
pub is_bonus: bool, pub is_bonus: bool,

View File

@ -69,10 +69,7 @@ impl Api {
let balance = r.balance.unwrap_or(0.00); let balance = r.balance.unwrap_or(0.00);
let balance_bota = r.balance_bota.unwrap_or(0.00); let balance_bota = r.balance_bota.unwrap_or(0.00);
let balance_sum = r.balance_sum.unwrap_or(0.00); let balance_sum = r.balance_sum.unwrap_or(0.00);
let companies = match r.companies { let companies = r.companies.map(|v| v.get().to_string());
Some(v) => v.as_str().map(|ss| ss.to_string()),
None => None,
};
Ok(models::GetBalanceForUserResponse { Ok(models::GetBalanceForUserResponse {
balance, balance,

View File

@ -13,7 +13,7 @@ pub struct _GetBalanceForUserResponse {
pub balance_bota: Option<f64>, pub balance_bota: Option<f64>,
#[serde(rename = "balanceSum")] #[serde(rename = "balanceSum")]
pub balance_sum: Option<f64>, pub balance_sum: Option<f64>,
pub companies: Option<serde_json::value::Value>, pub companies: Option<Box<serde_json::value::RawValue>>,
} }
#[derive(Serialize, Deserialize, Debug)] #[derive(Serialize, Deserialize, Debug)]

View File

@ -137,10 +137,7 @@ impl Synchronizer {
}); });
} }
}; };
let detail = match b.detail { let detail = b.detail.map(|v| v.get().to_string());
Some(v) => v.as_str().map(|ss| ss.to_string()),
None => None,
};
new_betting_history.push(repositories::betting_history::models::NewBettingHistory { new_betting_history.push(repositories::betting_history::models::NewBettingHistory {
id: b._id, id: b._id,