bug fixed
This commit is contained in:
parent
dfc328b636
commit
ccc3e0c9f1
|
@ -36,7 +36,8 @@ pub struct Betting {
|
|||
#[serde(rename = "groupKey")]
|
||||
pub group_key: Option<String>,
|
||||
/// 게임 데이터
|
||||
pub detail: Option<serde_json::Value>,
|
||||
#[serde(skip_deserializing)]
|
||||
pub detail: Option<String>,
|
||||
/// 보너스 여부
|
||||
#[serde(rename = "isBonus")]
|
||||
pub is_bonus: bool,
|
||||
|
|
|
@ -69,17 +69,7 @@ impl Api {
|
|||
let balance = r.balance.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 companies = match r.companies {
|
||||
Some(v) => {
|
||||
let vv = serde_json::from_value::<String>(v).map_err(|e| Error {
|
||||
code: -1,
|
||||
msg: Some(e.to_string()),
|
||||
})?;
|
||||
|
||||
Some(vv)
|
||||
}
|
||||
None => None,
|
||||
};
|
||||
let companies = r.companies;
|
||||
|
||||
Ok(models::GetBalanceForUserResponse {
|
||||
balance,
|
||||
|
|
|
@ -13,7 +13,8 @@ pub struct _GetBalanceForUserResponse {
|
|||
pub balance_bota: Option<f64>,
|
||||
#[serde(rename = "balanceSum")]
|
||||
pub balance_sum: Option<f64>,
|
||||
pub companies: Option<serde_json::Value>,
|
||||
#[serde(skip_deserializing)]
|
||||
pub companies: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
|
|
@ -137,17 +137,7 @@ impl Synchronizer {
|
|||
});
|
||||
}
|
||||
};
|
||||
let detail = match b.detail {
|
||||
Some(v) => {
|
||||
let vv = serde_json::from_value::<String>(v).map_err(|e| api::core::models::Error {
|
||||
code: -1,
|
||||
msg: Some(format!("serde_json::from_value error: {}", e)),
|
||||
})?;
|
||||
|
||||
Some(vv)
|
||||
}
|
||||
None => None,
|
||||
};
|
||||
let detail = b.detail;
|
||||
|
||||
new_betting_history.push(repositories::betting_history::models::NewBettingHistory {
|
||||
id: b._id,
|
||||
|
|
Loading…
Reference in New Issue
Block a user