From 4dd21fa2aafc61947ee20be16ea7c61a50c1572f Mon Sep 17 00:00:00 2001 From: phil Date: Thu, 2 Oct 2025 17:21:08 -0400 Subject: [PATCH] fix paths and verify it works via api --- constellation/src/server/mod.rs | 4 +++- constellation/src/storage/rocks_store.rs | 2 ++ constellation/templates/get-backlinks.html.j2 | 2 +- .../templates/get-many-to-many-counts.html.j2 | 16 ++++++++++++++++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/constellation/src/server/mod.rs b/constellation/src/server/mod.rs index 3b94e2a..9c3d1ad 100644 --- a/constellation/src/server/mod.rs +++ b/constellation/src/server/mod.rs @@ -293,12 +293,14 @@ fn get_many_to_many_counts( }; let path = format!(".{path}"); + let path_to_other = format!(".{}", query.path_to_other); + let paged = store .get_many_to_many_counts( &query.subject, collection, &path, - &query.path_to_other, + &path_to_other, limit, cursor_key, &filter_dids, diff --git a/constellation/src/storage/rocks_store.rs b/constellation/src/storage/rocks_store.rs index b015d33..3c7f546 100644 --- a/constellation/src/storage/rocks_store.rs +++ b/constellation/src/storage/rocks_store.rs @@ -959,6 +959,7 @@ impl LinkReader for RocksStorage { let after = after.map(|s| s.parse::().map(TargetId)).transpose()?; let Some(target_id) = self.target_id_table.get_id_val(&self.db, &target_key)? else { + eprintln!("nothin doin for this target, {target_key:?}"); return Ok(Default::default()); }; @@ -1019,6 +1020,7 @@ impl LinkReader for RocksStorage { .take(1) .next() else { + eprintln!("no forward match"); continue; }; diff --git a/constellation/templates/get-backlinks.html.j2 b/constellation/templates/get-backlinks.html.j2 index 2b360cc..432fb4b 100644 --- a/constellation/templates/get-backlinks.html.j2 +++ b/constellation/templates/get-backlinks.html.j2 @@ -1,7 +1,7 @@ {% extends "base.html.j2" %} {% import "try-it-macros.html.j2" as try_it %} -{% block title %}Links{% endblock %} +{% block title %}Backlinks{% endblock %} {% block description %}All {{ query.source }} records with links to {{ query.subject }}{% endblock %} {% block content %} diff --git a/constellation/templates/get-many-to-many-counts.html.j2 b/constellation/templates/get-many-to-many-counts.html.j2 index e69de29..b0aa16d 100644 --- a/constellation/templates/get-many-to-many-counts.html.j2 +++ b/constellation/templates/get-many-to-many-counts.html.j2 @@ -0,0 +1,16 @@ +{% extends "base.html.j2" %} +{% import "try-it-macros.html.j2" as try_it %} + +{% block title %}Many to Many counts{% endblock %} +{% block description %}All {{ query.source }} records with links to {{ query.subject }}{% endblock %} + +{% block content %} + + (todo) + +
+ Raw JSON response +
{{ self|tojson }}
+
+ +{% endblock %} -- 2.51.2