aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorPjotr Prins2023-08-10 08:33:01 +0200
committerPjotr Prins2023-08-10 08:33:01 +0200
commitff21db13b3243c31a52462aad4e0faaefc55a239 (patch)
tree56fa1a94f43e1ae83be39d7d0c1df3289c4a18e1 /web
parentbeac3666482c071301e0c2b058e86d07381b9c18 (diff)
downloadgn-guile-ff21db13b3243c31a52462aad4e0faaefc55a239.tar.gz
Quick hack for meta
Diffstat (limited to 'web')
-rwxr-xr-xweb/webserver.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/web/webserver.scm b/web/webserver.scm
index 2619319..a5671dc 100755
--- a/web/webserver.scm
+++ b/web/webserver.scm
@@ -170,6 +170,13 @@
(define (get-species-shortnames recs)
(map (lambda r (assoc-ref (car r) "shortName")) recs))
+(define (get-species-meta2 recs)
+ "Return a list of short names and expand them to URIs"
+ (map (lambda r
+ (let ([shortname (assoc-ref (car r) "shortName")])
+ (cons shortname (mk-meta shortname)))) recs)
+ )
+
(define (get-species-links recs)
"Return a list of short names and expand them to URIs"
(map (lambda r
@@ -186,6 +193,7 @@
("doc" . ,(mk-doc "species"))
("meta" . ,(mk-meta "species"))
("rec" . ,(mk-rec "species"))
+ ("meta" . ,(get-species-meta2 recs))
("links" . ,(get-species-links recs)))))
;; ---- REST API web server handler