Almost
This commit is contained in:
+6
-5
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user