summaryrefslogtreecommitdiffstats
path: root/service-person/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'service-person/src/main.rs')
-rw-r--r--service-person/src/main.rs17
1 files changed, 1 insertions, 16 deletions
diff --git a/service-person/src/main.rs b/service-person/src/main.rs
index 31050e0..75964b0 100644
--- a/service-person/src/main.rs
+++ b/service-person/src/main.rs
@@ -13,25 +13,10 @@ mod model;
mod schema;
use crate::db::DbPool;
+use person_api_types::v1::person::*;
embed_migrations!("migrations");
-#[derive(Debug, serde::Deserialize)]
-pub struct PersonCreateRequestData {
- name: String,
- age: i32,
-
- country: String,
- city: String,
- street: String,
- number: i32,
-}
-
-#[derive(Debug, serde::Serialize)]
-pub struct PersonCreateResponse {
- id: i32
-}
-
async fn create_person(db: web::Data<DbPool>, person: web::Json<PersonCreateRequestData>) -> impl Responder {
log::debug!("Creating person = {:?}", person);