added admin login to frontend + obscurification for contact details

This commit is contained in:
2026-05-14 17:21:34 +02:00
parent 0102c89d81
commit 244dc076cb
13 changed files with 722 additions and 44 deletions
+2
View File
@@ -11,6 +11,7 @@ pub enum AppError {
Unauthorized,
NotFound(String),
BadRequest(String),
TooManyRequests(String),
/// (public_message, internal_details) — details are logged but not returned.
Internal(String, Option<String>),
}
@@ -21,6 +22,7 @@ impl IntoResponse for AppError {
AppError::Unauthorized => (StatusCode::UNAUTHORIZED, "Unauthorized".to_string()),
AppError::NotFound(msg) => (StatusCode::NOT_FOUND, msg),
AppError::BadRequest(msg) => (StatusCode::BAD_REQUEST, msg),
AppError::TooManyRequests(msg) => (StatusCode::TOO_MANY_REQUESTS, msg),
AppError::Internal(msg, details) => {
if let Some(d) = details {
error!("Internal error: {} — {}", msg, d);