api-types: set serde defaults for UserWithTokens

since `totp_locked` is not wrapped in an `Option` we need to
explicitly tell serde about its default

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2023-08-01 09:10:45 +02:00
parent e95065f68d
commit 7b449954bb

View File

@ -104,7 +104,7 @@ pub struct UserWithTokens {
pub email: Option<String>,
#[serde(skip_serializing_if = "Vec::is_empty", default)]
pub tokens: Vec<ApiToken>,
#[serde(skip_serializing_if = "bool_is_false")]
#[serde(skip_serializing_if = "bool_is_false", default)]
pub totp_locked: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub tfa_locked_until: Option<i64>,