tfa: remove/empty description for recovery keys
While the user chosen description is not allowed to be empty, we do leave it empty for recovery keys, as a "dummy description" makes little sense... Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
f57ae48286
commit
9b6bddb24c
@ -343,6 +343,7 @@ pub struct TfaInfo {
|
|||||||
pub id: String,
|
pub id: String,
|
||||||
|
|
||||||
/// User chosen description for this entry.
|
/// User chosen description for this entry.
|
||||||
|
#[serde(skip_serializing_if = "String::is_empty")]
|
||||||
pub description: String,
|
pub description: String,
|
||||||
|
|
||||||
/// Creation time of this entry as unix epoch.
|
/// Creation time of this entry as unix epoch.
|
||||||
@ -359,7 +360,7 @@ impl TfaInfo {
|
|||||||
pub(crate) fn recovery(created: i64) -> Self {
|
pub(crate) fn recovery(created: i64) -> Self {
|
||||||
Self {
|
Self {
|
||||||
id: "recovery".to_string(),
|
id: "recovery".to_string(),
|
||||||
description: "recovery keys".to_string(),
|
description: String::new(),
|
||||||
enable: true,
|
enable: true,
|
||||||
created,
|
created,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user