fix(paheko): case insensitive user names search
This commit is contained in:
parent
6ae274e810
commit
6913defcd9
1 changed files with 5 additions and 1 deletions
|
@ -118,7 +118,11 @@ pub async fn sync_paheko(
|
|||
// check for existing user in paheko by email
|
||||
// TODO: check user with fuzzing first name and last name
|
||||
let existing_user_opt = existing_users
|
||||
.iter().find(|user| user.first_name == answer.first_name && user.last_name == answer.last_name)
|
||||
.iter()
|
||||
.find(|user|
|
||||
user.first_name.clone().map(|x| x.to_lowercase()) == answer.first_name.clone().map(|x| x.to_lowercase()) &&
|
||||
user.last_name.to_lowercase() == answer.last_name.to_lowercase()
|
||||
)
|
||||
.cloned();
|
||||
let pk_user_summary = match existing_user_opt.clone() {
|
||||
Some(user) => {
|
||||
|
|
Loading…
Reference in a new issue