register process optional value handlin in the sql database

This commit is contained in:
Alex Emmet 2026-01-13 22:57:48 +01:00
commit d51b2f73a2
4 changed files with 205 additions and 143 deletions

View file

@ -10,6 +10,7 @@ pub enum DataTypes {
error_type,
accepted_ids,
uuid,
register_id,
settings,
settings_name,
chat_partner_id,
@ -92,6 +93,7 @@ impl DataTypes {
match normalized.as_str() {
"errortype" => DataTypes::error_type,
"chatpartnerid" => DataTypes::chat_partner_id,
"registerid" => DataTypes::register_id,
"uuid" => DataTypes::uuid,
"settings" => DataTypes::settings,
"settingsname" => DataTypes::settings_name,
@ -174,6 +176,7 @@ impl DataTypes {
#[allow(non_camel_case_types, dead_code)]
pub enum CommunicationType {
error,
error_internal,
error_invalid_data,
error_invalid_user_id,
error_invalid_omikron_id,
@ -211,6 +214,8 @@ pub enum CommunicationType {
register_response,
identification,
identification_response,
register_iota,
register_iota_success,
ping,
pong,
add_chat,
@ -273,6 +278,7 @@ impl CommunicationType {
"function" => CommunicationType::function,
"update" => CommunicationType::update,
"createuser" => CommunicationType::create_user,
"errorinternal" => CommunicationType::error_internal,
"errorinvaliddata" => CommunicationType::error_invalid_data,
"errorinvaliduserid" => CommunicationType::error_invalid_user_id,
"errorinvalidomikronid" => CommunicationType::error_invalid_omikron_id,
@ -310,6 +316,8 @@ impl CommunicationType {
"registerresponse" => CommunicationType::register_response,
"identification" => CommunicationType::identification,
"identificationresponse" => CommunicationType::identification_response,
"registeriota" => CommunicationType::register_iota,
"registeriotasuccess" => CommunicationType::register_iota_success,
"ping" => CommunicationType::ping,
"pong" => CommunicationType::pong,
"addchat" => CommunicationType::add_chat,