updated dependencies application wide

This commit is contained in:
Per Stark
2025-04-24 13:50:20 +02:00
parent ce006f6ecc
commit 776a454a88
23 changed files with 1315 additions and 852 deletions

View File

@@ -1,5 +1,4 @@
use axum::{
async_trait,
extract::{FromRequestParts, Request},
http::request::Parts,
middleware::Next,
@@ -15,7 +14,6 @@ use super::response_middleware::TemplateResponse;
pub struct RequireUser(pub User);
// Implement FromRequestParts for RequireUser
#[async_trait]
impl<S> FromRequestParts<S> for RequireUser
where
S: Send + Sync,

View File

@@ -101,8 +101,8 @@ impl IntoResponse for TemplateResponse {
pub async fn with_template_response<S>(
State(state): State<S>,
HxRequest(is_htmx): HxRequest,
response: Response,
) -> Response
response: Response<axum::body::Body>,
) -> Response<axum::body::Body>
where
S: ProvidesTemplateEngine + Clone + Send + Sync + 'static,
{

View File

@@ -25,17 +25,17 @@ where
Router::new()
.route("/chat", get(show_chat_base).post(new_chat_user_message))
.route(
"/chat/:id",
"/chat/{id}",
get(show_existing_chat)
.post(new_user_message)
.delete(delete_conversation),
)
.route(
"/chat/:id/title",
"/chat/{id}/title",
get(show_conversation_editing_title).patch(patch_conversation_title),
)
.route("/chat/sidebar", get(reload_sidebar))
.route("/initialized-chat", post(show_initialized_chat))
.route("/chat/response-stream", get(get_response_stream))
.route("/chat/reference/:id", get(show_reference_tooltip))
.route("/chat/reference/{id}", get(show_reference_tooltip))
}

View File

@@ -15,7 +15,7 @@ where
Router::new()
.route("/content", get(show_content_page))
.route(
"/content/:id",
"/content/{id}",
get(show_text_content_edit_form)
.patch(patch_text_content)
.delete(delete_text_content),

View File

@@ -23,7 +23,7 @@ where
HtmlState: FromRef<S>,
{
Router::new()
.route("/jobs/:job_id", delete(delete_job))
.route("/jobs/{job_id}", delete(delete_job))
.route("/active-jobs", get(show_active_jobs))
.route("/text-content/:id", delete(delete_text_content))
.route("/text-content/{id}", delete(delete_text_content))
}

View File

@@ -50,9 +50,9 @@ pub struct KnowledgeBaseData {
pub async fn show_knowledge_page(
State(state): State<HtmlState>,
RequireUser(user): RequireUser,
Query(mut params): Query<FilterParams>,
HxRequest(is_htmx): HxRequest,
HxBoosted(is_boosted): HxBoosted,
Query(mut params): Query<FilterParams>,
) -> Result<impl IntoResponse, HtmlError> {
// Normalize filters
params.entity_type = params.entity_type.take().filter(|s| !s.trim().is_empty());

View File

@@ -20,14 +20,14 @@ where
Router::new()
.route("/knowledge", get(show_knowledge_page))
.route(
"/knowledge-entity/:id",
"/knowledge-entity/{id}",
get(show_edit_knowledge_entity_form)
.delete(delete_knowledge_entity)
.patch(patch_knowledge_entity),
)
.route("/knowledge-relationship", post(save_knowledge_relationship))
.route(
"/knowledge-relationship/:id",
"/knowledge-relationship/{id}",
delete(delete_knowledge_relationship),
)
}