Skip to content

Commit

Permalink
backend/routes/management: convert configured_users to lowercase.
Browse files Browse the repository at this point in the history
This fixes users getting removed due to different casing in Email-addresses. See https://www.tinkerunity.org/topic/12612-warp3-keine-fernwartungsnutzer-speicherbar-seit-firmware%C2%A0266675aeb99/
  • Loading branch information
ffreddow committed Dec 17, 2024
1 parent 25d406c commit 3b65221
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions backend/src/routes/management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,10 @@ async fn update_configured_users(
data: &ManagementDataVersion
) -> actix_web::Result<Vec<u32>> {
let configured_users = if let ManagementDataVersion::V2(data) = data {

// Get uuids of configured users on wallbox
let mut configured_users: Vec<uuid::Uuid> = Vec::new();
for user in data.configured_users.iter() {
match get_user_id(&state, FindBy::Email(user.email.to_string())).await {
match get_user_id(&state, FindBy::Email(user.email.to_string().to_lowercase())).await {
Ok(u) => {
use db_connector::schema::allowed_users::dsl as allowed_users;

Expand Down

0 comments on commit 3b65221

Please sign in to comment.