Posts dedicated page with cards linking to specific post
This commit is contained in:
@@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user