don't use literal "configured_" strings all over the place but have clear APIs for loading/saving account login params

This commit is contained in:
holger krekel
2022-04-13 19:50:04 +02:00
parent 3c75b36148
commit c0abcf3daa
6 changed files with 22 additions and 12 deletions

View File

@@ -85,7 +85,7 @@ impl Context {
async fn inner_configure(&self) -> Result<()> {
info!(self, "Configure ...");
let mut param = LoginParam::from_database(self, "").await?;
let mut param = LoginParam::load_candidate_params(self).await?;
let success = configure(self, &mut param).await;
self.set_config(Config::NotifyAboutWrongPw, None).await?;
@@ -454,7 +454,7 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
progress!(ctx, 910);
// the trailing underscore is correct
param.save_to_database(ctx, "configured_").await?;
param.save_as_configured_params(ctx).await?;
ctx.set_config(Config::ConfiguredTimestamp, Some(&time().to_string()))
.await?;