custom extractors rejection
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
use crate::{
|
||||
domain::PostEntry,
|
||||
routes::{AppError, not_found},
|
||||
routes::{AppError, Path, Query, not_found_html},
|
||||
startup::AppState,
|
||||
templates::{HtmlTemplate, PostListTemplate, PostTemplate, PostsTemplate},
|
||||
};
|
||||
use anyhow::Context;
|
||||
use askama::Template;
|
||||
use axum::{
|
||||
extract::{Path, Query, State},
|
||||
extract::State,
|
||||
response::{Html, IntoResponse, Redirect, Response},
|
||||
};
|
||||
use sqlx::PgPool;
|
||||
@@ -90,7 +90,7 @@ pub async fn see_post(
|
||||
let template = HtmlTemplate(PostTemplate { post });
|
||||
Ok(template.into_response())
|
||||
} else {
|
||||
Ok(not_found().await)
|
||||
Ok(not_found_html())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user