Updating name references for library
This commit is contained in:
+2
-12
@@ -49,7 +49,7 @@ pub mod response {
|
||||
#[derive(Debug, Default, Deserialize, Serialize, ToSchema)]
|
||||
pub struct AddContactResponse {
|
||||
pub message: String,
|
||||
pub data: Vec<textsender_models::contact::Contact>,
|
||||
pub data: Vec<schedtxt_models::contact::Contact>,
|
||||
}
|
||||
|
||||
pub use AddContactResponse as GetContactResponse;
|
||||
@@ -69,19 +69,9 @@ pub mod response {
|
||||
pub new_lastname: Option<String>,
|
||||
pub new_nickname: Option<String>,
|
||||
}
|
||||
|
||||
/*
|
||||
#[derive(Debug, Default, Deserialize, Serialize, ToSchema)]
|
||||
pub struct GetContactResponse {
|
||||
pub message: String,
|
||||
pub data: Vec<textsender_models::contact::Contact>,
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
pub mod endpoint {
|
||||
// use axum::{Json, response::IntoResponse};
|
||||
|
||||
use crate::repo::contact as contact_repo;
|
||||
|
||||
/// Endpoint to create Contact
|
||||
@@ -126,7 +116,7 @@ pub mod endpoint {
|
||||
sqlx::Error::RowNotFound => {
|
||||
println!("Good to create");
|
||||
// Put code here
|
||||
let mut contact = textsender_models::contact::Contact {
|
||||
let mut contact = schedtxt_models::contact::Contact {
|
||||
firstname: payload.firstname,
|
||||
lastname: payload.lastname,
|
||||
phone_number: payload.phone_number,
|
||||
|
||||
Reference in New Issue
Block a user