Posts dedicated page with cards linking to specific post

This commit is contained in:
Alphonse Paix
2025-09-19 01:04:10 +02:00
parent 71d4872878
commit 95c4d3fdd0
10 changed files with 260 additions and 16 deletions

View File

@@ -9,6 +9,7 @@ use askama::Template;
use axum::{
Form, Json,
extract::State,
http::HeaderMap,
response::{Html, IntoResponse, Response},
};
use axum::{http::StatusCode, response::Redirect};
@@ -114,11 +115,9 @@ pub async fn post_login(
.await
.map_err(|e| LoginError::UnexpectedError(e.into()))?;
let mut response = Redirect::to("/admin/dashboard").into_response();
response
.headers_mut()
.insert("HX-Redirect", "/admin/dashboard".parse().unwrap());
Ok(response)
let mut headers = HeaderMap::new();
headers.insert("HX-Redirect", "/admin/dashboard".parse().unwrap());
Ok((StatusCode::OK, headers).into_response())
}
}
}