diff --git a/rust/src/api/sync.rs b/rust/src/api/sync.rs index a71d595..9230e29 100644 --- a/rust/src/api/sync.rs +++ b/rust/src/api/sync.rs @@ -22,8 +22,8 @@ pub async fn sync_teams(pool: &SqlitePool, season: i64, client: &LeagueApiClient for data in response.teams { let manager1_name = data.manager1.and_then(|m| m.name); let manager2_name = data.manager2.and_then(|m| m.name); - let gm_discord_id = data.gm_discord_id.map(|id| id.to_string()); - let gm2_discord_id = data.gm2_discord_id.map(|id| id.to_string()); + let gm_discord_id = data.gm_discord_id; + let gm2_discord_id = data.gm2_discord_id; let division_id = data.division.as_ref().map(|d| d.id).flatten(); let division_name = data.division.as_ref().and_then(|d| d.division_name.clone()); let league_abbrev = data.division.as_ref().and_then(|d| d.league_abbrev.clone()); diff --git a/rust/src/api/types.rs b/rust/src/api/types.rs index 43db060..ac86422 100644 --- a/rust/src/api/types.rs +++ b/rust/src/api/types.rs @@ -59,12 +59,12 @@ pub struct TeamData { pub stadium: Option, #[serde(default)] pub salary_cap: Option, - /// Discord user ID of the primary GM (API sends integer, DB stores as String). + /// Discord user ID of the primary GM (API sends as string). #[serde(rename = "gmid", default)] - pub gm_discord_id: Option, - /// Discord user ID of the secondary GM (API sends integer, DB stores as String). + pub gm_discord_id: Option, + /// Discord user ID of the secondary GM (API sends as string). #[serde(rename = "gmid2", default)] - pub gm2_discord_id: Option, + pub gm2_discord_id: Option, #[serde(default)] pub manager1: Option, #[serde(default)]