mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-12-22 11:43:49 +01:00
switch tokenlist to uuids
This commit is contained in:
parent
d32936e6e6
commit
3e72d915e6
@ -210,20 +210,13 @@ impl card_d_e_s_fire_e_v2::Server for User {
|
||||
"User API object with nonexisting user \"{}\"",
|
||||
self.user.get_username()
|
||||
))));
|
||||
let tk = user
|
||||
if let Some(tk) = user
|
||||
.userdata
|
||||
.kv
|
||||
.get("cardtoken")
|
||||
.map(|ck| hex::decode(ck).ok())
|
||||
.flatten()
|
||||
.unwrap_or_else(|| {
|
||||
tracing::debug!(user.id = &user.id, "no tokens stored");
|
||||
Vec::new()
|
||||
});
|
||||
if !tk.is_empty() {
|
||||
.get("cardtoken") {
|
||||
let mut b = results.get();
|
||||
let mut lb = b.init_token_list(1);
|
||||
lb.set(0, &tk[..]);
|
||||
lb.set(0, tk.as_ref());
|
||||
}
|
||||
Promise::ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user