refactor: Used askama_axum::Template
docs: https://djc.github.io/askama/integrations.html#axum-integration
This commit is contained in:
@ -1,10 +1,9 @@
|
||||
use askama::Template;
|
||||
use askama_axum::IntoResponse;
|
||||
use askama_axum::Template;
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "pages/cps.html")]
|
||||
struct CpsResponse;
|
||||
pub struct CpsTemplate;
|
||||
|
||||
pub async fn cps() -> impl IntoResponse {
|
||||
CpsResponse.into_response()
|
||||
pub async fn cps() -> CpsTemplate {
|
||||
CpsTemplate
|
||||
}
|
||||
|
Reference in New Issue
Block a user