new-user: deactivate creaton via json record
* need rework Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
@@ -73,7 +73,7 @@ fn main() {
|
|||||||
stdin().read_to_string(&mut body).unwrap();
|
stdin().read_to_string(&mut body).unwrap();
|
||||||
|
|
||||||
// insert as multicolon
|
// insert as multicolon
|
||||||
let mut ret = User::new(
|
let ret = User::new(
|
||||||
last_name,
|
last_name,
|
||||||
Some(first_name),
|
Some(first_name),
|
||||||
Some(alias),
|
Some(alias),
|
||||||
@@ -91,7 +91,7 @@ fn main() {
|
|||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
|
||||||
// prepare full record
|
// prepare full record
|
||||||
let json_record = json!({
|
let _json_record = json!({
|
||||||
"first_name": "Daniela",
|
"first_name": "Daniela",
|
||||||
"last_name": "Knocke",
|
"last_name": "Knocke",
|
||||||
"alias": "Sekretariat",
|
"alias": "Sekretariat",
|
||||||
@@ -104,15 +104,15 @@ fn main() {
|
|||||||
"id_changed": 1,
|
"id_changed": 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
println!(
|
// println!(
|
||||||
"\nCreate user {} via json record:\n{}",
|
// "\nCreate user {} via json record:\n{}",
|
||||||
json_record["last_name"], json_record
|
// json_record["last_name"], json_record
|
||||||
);
|
// );
|
||||||
ret = User::set_user_struct_json_option(&connection);
|
// ret = User::set_user_struct_json_option(&connection);
|
||||||
println!(
|
// println!(
|
||||||
"Created new user {} via json-struct returns {:?}",
|
// "Created new user {} via json-struct returns {:?}",
|
||||||
json_record["last_name"], ret
|
// json_record["last_name"], ret
|
||||||
);
|
//);
|
||||||
|
|
||||||
// insert as vector
|
// insert as vector
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user