implemented user editing endpoints
This commit is contained in:
parent
97f0a76c6c
commit
344282c30b
4 changed files with 296 additions and 10 deletions
|
|
@ -81,6 +81,8 @@ pub enum DataTypes {
|
|||
online_status,
|
||||
omikron_id,
|
||||
omikron_connections,
|
||||
reset_token,
|
||||
new_token,
|
||||
}
|
||||
|
||||
impl DataTypes {
|
||||
|
|
@ -161,6 +163,8 @@ impl DataTypes {
|
|||
"onlinestatus" => DataTypes::online_status,
|
||||
"omikronid" => DataTypes::omikron_id,
|
||||
"omikronconnections" => DataTypes::omikron_connections,
|
||||
"resettoken" => DataTypes::reset_token,
|
||||
"newtoken" => DataTypes::new_token,
|
||||
_ => DataTypes::error_type, // fallback if unknown
|
||||
}
|
||||
}
|
||||
|
|
@ -170,6 +174,7 @@ impl DataTypes {
|
|||
#[allow(non_camel_case_types, dead_code)]
|
||||
pub enum CommunicationType {
|
||||
error,
|
||||
error_invalid_data,
|
||||
error_invalid_user_id,
|
||||
error_invalid_omikron_id,
|
||||
error_not_found,
|
||||
|
|
@ -244,6 +249,12 @@ pub enum CommunicationType {
|
|||
change_user_data,
|
||||
change_iota_data,
|
||||
|
||||
get_register,
|
||||
complete_register_user,
|
||||
complete_register_iota,
|
||||
delete_user,
|
||||
delete_iota,
|
||||
|
||||
start_register,
|
||||
complete_register,
|
||||
}
|
||||
|
|
@ -262,6 +273,7 @@ impl CommunicationType {
|
|||
"function" => CommunicationType::function,
|
||||
"update" => CommunicationType::update,
|
||||
"createuser" => CommunicationType::create_user,
|
||||
"errorinvaliddata" => CommunicationType::error_invalid_data,
|
||||
"errorinvaliduserid" => CommunicationType::error_invalid_user_id,
|
||||
"errorinvalidomikronid" => CommunicationType::error_invalid_omikron_id,
|
||||
"errornotfound" => CommunicationType::error_not_found,
|
||||
|
|
@ -326,6 +338,12 @@ impl CommunicationType {
|
|||
"changeuserdata" => CommunicationType::change_user_data,
|
||||
"changeiotadata" => CommunicationType::change_iota_data,
|
||||
|
||||
"getregister" => CommunicationType::get_register,
|
||||
"completeregisteruser" => CommunicationType::complete_register_user,
|
||||
"completeregisteriota" => CommunicationType::complete_register_iota,
|
||||
"deleteuser" => CommunicationType::delete_user,
|
||||
"deleteiota" => CommunicationType::delete_iota,
|
||||
|
||||
"startregister" => CommunicationType::start_register,
|
||||
"completeregister" => CommunicationType::complete_register,
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue