mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-12-22 03:33:48 +01:00
cargo fmt
This commit is contained in:
parent
98c2e3fd01
commit
e35e2b7334
@ -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(())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user