Add Base Path

This commit is contained in:
gabatxo1312 2026-01-31 00:05:53 +01:00
commit f6d4e7c556
No known key found for this signature in database
9 changed files with 98 additions and 21 deletions

View file

@ -6,6 +6,7 @@ use snafu::prelude::*;
use crate::{
models::{book::BookError, user::UserError},
routes::template_ctx::TemplateCtx,
state::config::ConfigError,
};
@ -47,6 +48,7 @@ pub enum AppStateError {
#[template(path = "error.html")]
struct ErrorTemplate {
state: AppStateErrorContext,
ctx: TemplateCtx,
}
struct AppStateErrorContext {
@ -66,6 +68,9 @@ impl IntoResponse for AppStateError {
let error_context = AppStateErrorContext::from(self);
ErrorTemplate {
state: error_context,
ctx: TemplateCtx {
base_path: "".to_string(),
},
}
.into_response()
}