custom extractors rejection
Some checks failed
Rust / Test (push) Has been cancelled
Rust / Rustfmt (push) Has been cancelled
Rust / Clippy (push) Has been cancelled
Rust / Code coverage (push) Has been cancelled

This commit is contained in:
Alphonse Paix
2025-09-27 02:28:04 +02:00
parent f9ae3f42a6
commit f43e143bf6
6 changed files with 68 additions and 13 deletions

View File

@@ -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())
}
}