This commit is contained in:
2026-06-13 16:10:00 -04:00
parent fdb5e23e90
commit 773049835c
+6 -5
View File
@@ -47,7 +47,7 @@ pub mod contact {
pub message: String, pub message: String,
// TODO: Should be this. Update code in textsender_models // TODO: Should be this. Update code in textsender_models
// pub data: Vec<textsender_models::contact::Contact>, // pub data: Vec<textsender_models::contact::Contact>,
pub data: Vec<uuid::Uuid>, pub data: Vec<textsender_models::contact::Contact>,
} }
} }
@@ -90,10 +90,11 @@ pub mod contact {
..Default::default() ..Default::default()
}; };
match crate::repo::contact::insert(&pool, &contact).await { match crate::repo::contact::insert(&pool, &contact).await {
Ok(_) => ( Ok(_) => {
axum::http::StatusCode::NOT_IMPLEMENTED, response.message = String::from(super::super::response::SUCCESSFUL);
axum::Json(response),
), (axum::http::StatusCode::CREATED, axum::Json(response))
}
Err(err) => { Err(err) => {
eprintln!("Error: {err:?}"); eprintln!("Error: {err:?}");
response.message = String::from("Contact not created"); response.message = String::from("Contact not created");