♻️ Exige la petición en las variantes de ErrorPage
Sustituye `Option<HttpRequest>` por `HttpRequest` en todas las variantes. Ningún uso construía un ErrorPage sin petición y, sin ella, la página de error pierde el idioma negociado y el usuario actual.
This commit is contained in:
parent
947aef2f91
commit
a6d15ab211
13 changed files with 59 additions and 62 deletions
|
|
@ -411,7 +411,7 @@ async fn trigger_post(request: HttpRequest) -> Response {
|
|||
.filter(|(scheme, _)| scheme.eq_ignore_ascii_case("Bearer"))
|
||||
.map(|(_, token)| token.trim_start());
|
||||
if !token.is_some_and(scheduler::token_matches) {
|
||||
return ErrorPage::NotFound(Some(request)).into_response();
|
||||
return ErrorPage::NotFound(request).into_response();
|
||||
}
|
||||
// Siempre `200 OK`, aunque falle algún trabajo: un reintento del programa externo podría
|
||||
// llegar a otra instancia y repetir también los que terminaron bien. Sólo se indica el tipo de
|
||||
|
|
@ -433,5 +433,5 @@ async fn trigger_post(request: HttpRequest) -> Response {
|
|||
}
|
||||
|
||||
async fn not_found(request: HttpRequest) -> ErrorPage {
|
||||
ErrorPage::NotFound(Some(request))
|
||||
ErrorPage::NotFound(request)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue