improved htmlerror ergonomics

This commit is contained in:
Per Stark
2025-01-21 22:48:11 +01:00
parent c953dffe56
commit 1532ada09f
14 changed files with 126 additions and 85 deletions

View File

@@ -35,8 +35,7 @@ pub async fn show_account_page(
AccountData::template_name(),
AccountData { user },
state.templates.clone(),
)
.map_err(|e| HtmlError::new(AppError::from(e), state.templates.clone()))?;
)?;
Ok(output.into_response())
}
@@ -70,8 +69,7 @@ pub async fn set_api_key(
"api_key_section",
AccountData { user: updated_user },
state.templates.clone(),
)
.map_err(|e| HtmlError::new(AppError::from(e), state.templates.clone()))?;
)?;
Ok(output.into_response())
}