Saving changes
Rust Build / Rustfmt (pull_request) Successful in 42s
Rust Build / Test Suite (pull_request) Successful in 44s

This commit is contained in:
2026-06-18 18:14:50 -04:00
parent 82bc1ccfcd
commit 07c9a02021
3 changed files with 17 additions and 13 deletions
+5 -5
View File
@@ -10,12 +10,12 @@ pub async fn insert(
VALUES($1, $2, $3, $4, $5, $6, $7) RETURNING id; VALUES($1, $2, $3, $4, $5, $6, $7) RETURNING id;
"#, "#,
) )
.bind(&event.scheduled_message_event_id) .bind(event.scheduled_message_event_id)
.bind(&event.response) .bind(&event.response)
.bind(&event.user_id) .bind(event.user_id)
.bind(&event.sent) .bind(event.sent)
.bind(&event.contact_id) .bind(event.contact_id)
.bind(&event.message_id) .bind(event.message_id)
.bind(&event.status) .bind(&event.status)
.fetch_one(pool) .fetch_one(pool)
.await .await
+4 -4
View File
@@ -115,9 +115,9 @@ pub mod sched_msg_event {
VALUES($1, $2, $3) RETURNING id, created; VALUES($1, $2, $3) RETURNING id, created;
"#, "#,
) )
.bind(&scheduled_message_event.contact_id) .bind(scheduled_message_event.contact_id)
.bind(&scheduled_message_event.message_id) .bind(scheduled_message_event.message_id)
.bind(&scheduled_message_event.scheduled_message_id) .bind(scheduled_message_event.scheduled_message_id)
.fetch_one(pool) .fetch_one(pool)
.await .await
{ {
@@ -165,7 +165,7 @@ pub mod sched_msg_event {
scheduled_message_id = $1; scheduled_message_id = $1;
"#, "#,
) )
.bind(&scheduled_message_id) .bind(scheduled_message_id)
.fetch_all(pool) .fetch_all(pool)
.await .await
{ {
+8 -4
View File
@@ -379,6 +379,7 @@ mod request {
} }
} }
/*
pub async fn create_scheduled_message_event( pub async fn create_scheduled_message_event(
app: &axum::Router, app: &axum::Router,
contact_id: &uuid::Uuid, contact_id: &uuid::Uuid,
@@ -406,6 +407,7 @@ mod request {
Err(err) => Err(err), Err(err) => Err(err),
} }
} }
*/
} }
} }
@@ -722,9 +724,9 @@ async fn test_create_scheduled_message() {
let (tm_pool, db_name, pool) = db_mgr::get_database_ready().await; let (tm_pool, db_name, pool) = db_mgr::get_database_ready().await;
let app = init::app(pool).await; let app = init::app(pool).await;
let mut contact_id: uuid::Uuid = uuid::Uuid::nil(); // let mut contact_id: uuid::Uuid = uuid::Uuid::nil();
let mut message_id: uuid::Uuid = uuid::Uuid::nil(); // let mut message_id: uuid::Uuid = uuid::Uuid::nil();
let mut scheduled_message_id: uuid::Uuid = uuid::Uuid::nil(); // let mut scheduled_message_id: uuid::Uuid = uuid::Uuid::nil();
match request::create_contact(&app).await { match request::create_contact(&app).await {
Ok(response) => { Ok(response) => {
@@ -733,12 +735,13 @@ async fn test_create_scheduled_message() {
>(response) >(response)
.await; .await;
assert_eq!(false, resp.data.is_empty(), "Should not be empty"); assert_eq!(false, resp.data.is_empty(), "Should not be empty");
contact_id = resp.data[0].id.unwrap(); // contact_id = resp.data[0].id.unwrap();
} }
Err(err) => { Err(err) => {
assert!(false, "Error: {:?}", err); assert!(false, "Error: {:?}", err);
} }
}; };
/*
match request::message::create_message(&app).await { match request::message::create_message(&app).await {
Ok(response) => { Ok(response) => {
@@ -788,6 +791,7 @@ async fn test_create_scheduled_message() {
assert!(false, "Error: {err:?}"); assert!(false, "Error: {err:?}");
} }
} }
*/
let _ = db_mgr::drop_database(&tm_pool, &db_name).await; let _ = db_mgr::drop_database(&tm_pool, &db_name).await;
} }