From 7b3e8c5a624f60b49ee2691525f8990d55d39682 Mon Sep 17 00:00:00 2001 From: Prasunna Soppa Date: Sat, 28 Dec 2024 22:23:07 +0530 Subject: [PATCH] resolve pr comments --- crates/diesel_models/src/callback_mapper.rs | 4 ---- crates/diesel_models/src/query/callback_mapper.rs | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/crates/diesel_models/src/callback_mapper.rs b/crates/diesel_models/src/callback_mapper.rs index 3d00b929b767..c33f3cf881dc 100644 --- a/crates/diesel_models/src/callback_mapper.rs +++ b/crates/diesel_models/src/callback_mapper.rs @@ -1,6 +1,5 @@ use common_utils::pii; use diesel::{Identifiable, Insertable, Queryable, Selectable}; -use serde::{self, Deserialize, Serialize}; use crate::schema::callback_mapper; @@ -12,14 +11,11 @@ use crate::schema::callback_mapper; Identifiable, Queryable, Selectable, - Serialize, - Deserialize, Insertable, )] #[diesel(table_name = callback_mapper, primary_key(id, type_), check_for_backend(diesel::pg::Pg))] pub struct CallbackMapper { pub id: String, - #[serde(rename = "type")] pub type_: String, pub data: pii::SecretSerdeValue, pub created_at: time::PrimitiveDateTime, diff --git a/crates/diesel_models/src/query/callback_mapper.rs b/crates/diesel_models/src/query/callback_mapper.rs index 4b49455900e2..4210330e072e 100644 --- a/crates/diesel_models/src/query/callback_mapper.rs +++ b/crates/diesel_models/src/query/callback_mapper.rs @@ -6,7 +6,7 @@ use crate::{ }; impl CallbackMapper { - pub async fn insert(self, conn: &PgPooledConn) -> StorageResult { + pub async fn insert(self, conn: &PgPooledConn) -> StorageResult { generics::generic_insert(conn, self).await }