cargo fmt

This commit is contained in:
Nadja Reitzenstein 2023-02-09 17:07:31 +01:00
parent 98c2e3fd01
commit e35e2b7334

View File

@ -299,9 +299,7 @@ impl card_d_e_s_fire_e_v2::Server for User {
.insert("cardtoken".to_string(), token.to_string()); .insert("cardtoken".to_string(), token.to_string());
user.userdata.kv.insert("cardkey".to_string(), card_key); user.userdata.kv.insert("cardkey".to_string(), card_key);
self.session self.session.users.put_user(self.user.get_username(), &user);
.users
.put_user(self.user.get_username(), &user);
Promise::ok(()) Promise::ok(())
} }
@ -331,17 +329,16 @@ impl card_d_e_s_fire_e_v2::Server for User {
if let Some(prev_token) = user.userdata.kv.get("cardtoken") { if let Some(prev_token) = user.userdata.kv.get("cardtoken") {
if token.as_ref() == prev_token.as_str() { if token.as_ref() == prev_token.as_str() {
tracing::debug!( tracing::debug!(
user.id, token = token.as_ref(), user.id,
"removing card key/token pair" token = token.as_ref(),
); "removing card key/token pair"
);
user.userdata.kv.remove("cardtoken"); user.userdata.kv.remove("cardtoken");
user.userdata.kv.remove("cardkey"); user.userdata.kv.remove("cardkey");
} }
} }
self.session self.session.users.put_user(self.user.get_username(), &user);
.users
.put_user(self.user.get_username(), &user);
Promise::ok(()) Promise::ok(())
} }