summaryrefslogtreecommitdiff
path: root/makima/src/server/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'makima/src/server/handlers')
-rw-r--r--makima/src/server/handlers/repository_history.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/makima/src/server/handlers/repository_history.rs b/makima/src/server/handlers/repository_history.rs
index c788d84..9c309c0 100644
--- a/makima/src/server/handlers/repository_history.rs
+++ b/makima/src/server/handlers/repository_history.rs
@@ -97,6 +97,14 @@ pub async fn get_repository_suggestions(
let limit = params.limit.unwrap_or(10).min(50); // Cap at 50 for safety
+ tracing::debug!(
+ owner_id = %auth.owner_id,
+ source_type = ?params.source_type,
+ query = ?params.query,
+ limit = limit,
+ "Fetching repository suggestions"
+ );
+
match repository::get_repository_suggestions(
pool,
auth.owner_id,
@@ -107,6 +115,17 @@ pub async fn get_repository_suggestions(
.await
{
Ok(entries) => {
+ // Debug log to help diagnose filtering issues
+ for entry in &entries {
+ tracing::debug!(
+ id = %entry.id,
+ name = %entry.name,
+ source_type = %entry.source_type,
+ has_url = entry.repository_url.is_some(),
+ has_path = entry.local_path.is_some(),
+ "Repository suggestion entry"
+ );
+ }
let total = entries.len() as i64;
Json(RepositoryHistoryListResponse { entries, total }).into_response()
}