about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--gn/data/group.scm2
-rw-r--r--web/gn-uri.scm8
2 files changed, 7 insertions, 3 deletions
diff --git a/gn/data/group.scm b/gn/data/group.scm
index 003ac11..1505b21 100644
--- a/gn/data/group.scm
+++ b/gn/data/group.scm
@@ -18,6 +18,6 @@
         [uri (mk-gnid gnid)])
     (filter-map
      (lambda (r) (if (string=? (second r) uri)
-                     (list ("ref" . (car r)))
+                     `(("ref" . ,(mk-id (car r))))
                      #f)) recs)
   ))
diff --git a/web/gn-uri.scm b/web/gn-uri.scm
index c0a440a..951b24d 100644
--- a/web/gn-uri.scm
+++ b/web/gn-uri.scm
@@ -81,10 +81,14 @@
   (mk-html (string-append "term" "/" postfix)))
 
 (define (mk-id postfix)
-  (mk-html (string-append "id" "/" postfix)))
+  "Expand URL to make $api/id/identifier.
+   If postfix is a path it will only apply the last element"
+  (mk-url (string-append "id" "/" (url-parse-id postfix))))
 
 (define (mk-gnid postfix)
-  (mk-uri (string-append "id" "/" postfix)))
+  "Expand URL to make http://genenetwork.org/id/identifier.
+   If postfix is a path it will only apply the last element"
+  (mk-uri (string-append "id" "/" (url-parse-id postfix))))
 
 (define (mk-predicate postfix)
   (mk-html (string-append "predicate" "/" postfix)))