From d7d9b55eb43b9b905de0419cd26569aaeea6fe5a Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 4 Aug 2023 13:38:51 +0200 Subject: Resolves mouse.json --- gn3-guile/web/webserver.scm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'gn3-guile/web') diff --git a/gn3-guile/web/webserver.scm b/gn3-guile/web/webserver.scm index 4cd049c..6059545 100755 --- a/gn3-guile/web/webserver.scm +++ b/gn3-guile/web/webserver.scm @@ -377,13 +377,14 @@ SELECT ?species ?p ?o WHERE { (render-json (get-species-meta))) (('GET "species") (render-json (get-species-meta))) - (('GET shortname) + (('GET id) (let ([names (get-species-shortnames (get-expanded-species))]) - (if (string-contains shortname ".json") - (if (member (string-replace-substring shortname ".json" "") names) - (render-json shortname) - ) - (render-json "doc")))) + (if + (match (string->list "mouse.json") + [(name ... #\. #\j #\s #\o #\n) (list->string name)] + [rest #f]) + (render-json name) + (render-json "WIP")))) (_ (not-found (request-uri request))) )) -- cgit v1.2.3