checking for id duplication is added

This commit is contained in:
병준 박 2022-08-29 03:02:37 +00:00
parent d89d93c9d0
commit c4d8c03541

View File

@ -80,6 +80,14 @@ impl Synchronizer {
let res = self.game_api.list_games(req).await?;
for g in res.games {
match upsert_games.iter().find(|v| v.id.eq(&g.id)) {
Some(d) => {
println!("id is duplicated. e: {:?}, n: {:?}", d, g);
continue;
}
None => {}
};
upsert_games.push(repositories::game::models::UpsertGame {
id: g.id,
vendor_id: v.id,