diff --git a/frontend/src/pages/DebugPage.tsx b/frontend/src/pages/DebugPage.tsx
index c142bcf..bb79870 100644
--- a/frontend/src/pages/DebugPage.tsx
+++ b/frontend/src/pages/DebugPage.tsx
@@ -1063,10 +1063,10 @@ const DebugPage: React.FC = () => {
Quality Thresholds
- Brightness: {debugInfo.user_settings?.quality_thresholds?.brightness || 'N/A'}
- Contrast: {debugInfo.user_settings?.quality_thresholds?.contrast || 'N/A'}
- Noise: {debugInfo.user_settings?.quality_thresholds?.noise || 'N/A'}
- Sharpness: {debugInfo.user_settings?.quality_thresholds?.sharpness || 'N/A'}
+ Brightness: {debugInfo.user_settings?.ocr_quality_threshold_brightness || 'N/A'}
+ Contrast: {debugInfo.user_settings?.ocr_quality_threshold_contrast || 'N/A'}
+ Noise: {debugInfo.user_settings?.ocr_quality_threshold_noise || 'N/A'}
+ Sharpness: {debugInfo.user_settings?.ocr_quality_threshold_sharpness || 'N/A'}
diff --git a/src/routes/documents/debug.rs b/src/routes/documents/debug.rs
index f064b3b..520ea88 100644
--- a/src/routes/documents/debug.rs
+++ b/src/routes/documents/debug.rs
@@ -63,6 +63,17 @@ pub async fn get_document_debug_info(
None
};
+ // Get user settings
+ let user_settings = state
+ .db
+ .get_user_settings(auth_user.user.id)
+ .await
+ .map_err(|e| {
+ error!("Database error getting user settings: {}", e);
+ StatusCode::INTERNAL_SERVER_ERROR
+ })?
+ .map(|settings| settings.into());
+
// Construct processing steps based on document state
let mut processing_steps = vec!["uploaded".to_string()];
@@ -96,6 +107,7 @@ pub async fn get_document_debug_info(
file_exists,
readable,
permissions,
+ user_settings,
};
debug!("Debug info generated for document: {}", document_id);
diff --git a/src/routes/documents/types.rs b/src/routes/documents/types.rs
index a63b151..5e059eb 100644
--- a/src/routes/documents/types.rs
+++ b/src/routes/documents/types.rs
@@ -68,6 +68,7 @@ pub struct DocumentDebugInfo {
pub file_exists: bool,
pub readable: bool,
pub permissions: Option,
+ pub user_settings: Option,
}
#[derive(Serialize, Deserialize, ToSchema)]