mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2024-12-02 21:16:51 +01:00
Merge pull request #3215 from stefan0xC/fix-post-emergency-access
don't nullify key when editing emergency access
This commit is contained in:
commit
53fa8da5b1
1 changed files with 3 additions and 1 deletions
|
@ -123,7 +123,9 @@ async fn post_emergency_access(
|
||||||
|
|
||||||
emergency_access.atype = new_type;
|
emergency_access.atype = new_type;
|
||||||
emergency_access.wait_time_days = data.WaitTimeDays;
|
emergency_access.wait_time_days = data.WaitTimeDays;
|
||||||
|
if data.KeyEncrypted.is_some() {
|
||||||
emergency_access.key_encrypted = data.KeyEncrypted;
|
emergency_access.key_encrypted = data.KeyEncrypted;
|
||||||
|
}
|
||||||
|
|
||||||
emergency_access.save(&mut conn).await?;
|
emergency_access.save(&mut conn).await?;
|
||||||
Ok(Json(emergency_access.to_json()))
|
Ok(Json(emergency_access.to_json()))
|
||||||
|
|
Loading…
Reference in a new issue