feat(extractors): add OptionalCookieUser and RequiredCookieUser

This commit is contained in:
2026-05-04 13:34:31 +02:00
parent 450468ef3d
commit e5097c22dd
4 changed files with 256 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ pub mod html {
use application::{
commands::LogReviewCommand,
ports::HtmlPageContext,
queries::GetDiaryQuery,
use_cases::{get_diary, log_review},
};
@@ -38,9 +39,10 @@ pub mod html {
};
let page = get_diary::execute(&state.app_ctx, query).await?;
let ctx = HtmlPageContext { user_email: None, register_enabled: state.app_ctx.config.allow_registration };
let html = state
.html_renderer
.render_diary_page(&page)
.render_diary_page(&page, ctx)
.map_err(|e| ApiError(DomainError::InfrastructureError(e)))?;
Ok(Html(html))