Add avatar color support

The new web-vault v2023.1.0 supports a custom color for the avatar.
https://github.com/bitwarden/server/pull/2330

This PR adds this feature.
This commit is contained in:
BlackDex
2023-01-11 21:45:11 +01:00
parent 367e1ce289
commit 36b5350f9b
12 changed files with 42 additions and 1 deletions

View File

@@ -46,6 +46,8 @@ db_object! {
pub client_kdf_iter: i32,
pub api_key: Option<String>,
pub avatar_color: Option<String>,
}
#[derive(Identifiable, Queryable, Insertable)]
@@ -113,6 +115,8 @@ impl User {
client_kdf_iter: Self::CLIENT_KDF_ITER_DEFAULT,
api_key: None,
avatar_color: None,
}
}
@@ -226,6 +230,7 @@ impl User {
"Providers": [],
"ProviderOrganizations": [],
"ForcePasswordReset": false,
"AvatarColor": self.avatar_color,
"Object": "profile",
})
}