mirror of
https://github.com/perstarkse/minne.git
synced 2026-05-31 03:40:38 +02:00
fix: harden html responses and cache chat sidebar data
Use strict template response handling and sanitized template user context, then add an in-process conversation archive cache with mutation-driven invalidation for chat sidebar renders.
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
use axum::{
|
||||
extract::State,
|
||||
response::{Html, IntoResponse},
|
||||
Form,
|
||||
};
|
||||
use axum::{extract::State, response::IntoResponse, Form};
|
||||
use axum_htmx::HxBoosted;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@@ -57,7 +53,7 @@ pub async fn process_signup_and_show_verification(
|
||||
Ok(user) => user,
|
||||
Err(e) => {
|
||||
tracing::error!("{:?}", e);
|
||||
return Ok(Html(format!("<p>{e}</p>")).into_response());
|
||||
return Ok(TemplateResponse::bad_request(&e.to_string()).into_response());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user