1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-21 00:45:18 +00:00

Can update new user information fields

This commit is contained in:
2021-04-16 15:06:07 +02:00
parent b5d2410413
commit 2f931ff026
5 changed files with 13 additions and 1 deletions

View File

@ -4,7 +4,7 @@
use serde::Serialize;
use crate::constants::{conservation_policy, MIN_SUPPORTED_MOBILE_VERSION, password_policy};
use crate::constants::accounts_info_policy::{MAX_FIRST_NAME_LENGTH, MAX_LAST_NAME_LENGTH, MIN_FIRST_NAME_LENGTH, MIN_LAST_NAME_LENGTH};
use crate::constants::accounts_info_policy::{MAX_FIRST_NAME_LENGTH, MAX_LAST_NAME_LENGTH, MAX_LOCATION_LENGTH, MIN_FIRST_NAME_LENGTH, MIN_LAST_NAME_LENGTH};
use crate::constants::conversations::{ALLOWED_CONVERSATION_FILES_TYPES, CONVERSATION_FILES_MAX_SIZE, CONVERSATION_WRITING_EVENT_INTERVAL, CONVERSATION_WRITING_EVENT_LIFETIME, MAX_CONV_IMAGE_MESSAGE_WIDTH, MAX_CONV_LOGO_HEIGHT, MAX_CONV_LOGO_WIDTH, MAX_CONV_MESSAGE_THUMBNAIL_HEIGHT, MAX_CONV_MESSAGE_THUMBNAIL_WIDTH, MAX_CONVERSATION_MESSAGE_LENGTH, MAX_CONVERSATION_NAME_LENGTH, MIN_CONVERSATION_MESSAGE_LENGTH};
use crate::data::api_client::APIClient;
use crate::data::config::conf;
@ -60,6 +60,7 @@ struct AccountInformationPolicy {
max_first_name_length: u8,
min_last_name_length: u8,
max_last_name_length: u8,
max_location_length: usize,
}
#[derive(Serialize)]
@ -132,6 +133,7 @@ impl ServerConfig {
max_first_name_length: MAX_FIRST_NAME_LENGTH,
min_last_name_length: MIN_LAST_NAME_LENGTH,
max_last_name_length: MAX_LAST_NAME_LENGTH,
max_location_length: MAX_LOCATION_LENGTH,
},
}
}