From 661a9748147d60068d38a2a40e53131447548008 Mon Sep 17 00:00:00 2001
From: Pjotr Prins
Date: Tue, 11 Jul 2023 10:41:27 -0500
Subject: Return SPARQL response
---
gn3-guile/web/webserver.scm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/gn3-guile/web/webserver.scm b/gn3-guile/web/webserver.scm
index 1219f52..71ad79c 100755
--- a/gn3-guile/web/webserver.scm
+++ b/gn3-guile/web/webserver.scm
@@ -71,12 +71,16 @@
(define (sparql-exec query)
(sparql-scm query))
-(define (sparql-results query)
- (cdr (assoc "bindings" (cdr (assoc "results" (sparql-exec query)
+(define (sparql-names response)
+ (cdr (assoc "vars" (cdr (assoc "head" response))))
+ )
+
+(define (sparql-results response)
+ (cdr (assoc "bindings" (cdr (assoc "results" response
)))))
(define (sparql-species)
- (sparql-results "
+ (sparql-exec "
PREFIX gn:
PREFIX rdf:
--
cgit v1.2.3