diff --git a/src/repositories/betting_history/repository.rs b/src/repositories/betting_history/repository.rs index e6aba62..3049940 100644 --- a/src/repositories/betting_history/repository.rs +++ b/src/repositories/betting_history/repository.rs @@ -46,8 +46,12 @@ impl Repository { conn: &diesel::PgConnection, new_betting_history: &Vec, ) -> Result<(), Error> { + use api_kgon_betting_history::dsl; + diesel::insert_into(api_kgon_betting_history::table) .values(new_betting_history) + .on_conflict(dsl::id) + .do_nothing() .execute(conn)?; Ok(())