Files
movies-diary/crates/presentation/src/render.rs
Gabriel Kaszewski ac7edd6953
Some checks failed
CI / Check / Test (push) Failing after 5m56s
WIP: federation + integrations
2026-06-02 19:50:19 +02:00

15 lines
397 B
Rust

use axum::{
http::StatusCode,
response::{Html, IntoResponse, Response},
};
pub fn render_page(template: impl template_askama::askama::Template) -> Response {
match template.render() {
Ok(html) => Html(html).into_response(),
Err(e) => {
tracing::error!("template error: {e}");
StatusCode::INTERNAL_SERVER_ERROR.into_response()
}
}
}