mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-09-25 14:19:45 +00:00
Apply new first and last name restrictions
This commit is contained in:
@@ -9,6 +9,7 @@ use crate::api_data::res_check_security_answers::ResCheckSecurityAnswers;
|
||||
use crate::api_data::res_check_security_questions_exists::ResCheckSecurityQuestionsExists;
|
||||
use crate::api_data::res_get_security_questions::ResGetSecurityQuestions;
|
||||
use crate::api_data::user_mail_address::UserMailAddressAPI;
|
||||
use crate::constants::accounts_info_policy::{MIN_FIRST_NAME_LENGTH, MIN_LAST_NAME_LENGTH};
|
||||
use crate::constants::PASSWORD_RESET_TOKEN_LENGTH;
|
||||
use crate::data::base_request_handler::BaseRequestHandler;
|
||||
use crate::data::error::ResultBoxError;
|
||||
@@ -55,8 +56,8 @@ pub fn create(r: &mut HttpRequestHandler) -> RequestResult {
|
||||
}
|
||||
|
||||
let new_account = NewAccount {
|
||||
first_name: r.post_content("firstName", 3, true)?,
|
||||
last_name: r.post_content("lastName", 3, true)?,
|
||||
first_name: r.post_content("firstName", MIN_FIRST_NAME_LENGTH as usize, true)?,
|
||||
last_name: r.post_content("lastName", MIN_LAST_NAME_LENGTH as usize, true)?,
|
||||
email,
|
||||
password: r.post_string_opt("password", 3, true)?,
|
||||
};
|
||||
|
Reference in New Issue
Block a user