aboutsummaryrefslogtreecommitdiff
path: root/gn3-guile/web
diff options
context:
space:
mode:
authorPjotr Prins2023-08-04 13:43:42 +0200
committerPjotr Prins2023-08-04 13:43:42 +0200
commit1c0b72030ce3fdc67bba3fd2d18864dd1cfd9bb0 (patch)
tree1d0ca4d1fbfdabe714b4c48a6fa3fd1ae5042c15 /gn3-guile/web
parentd7d9b55eb43b9b905de0419cd26569aaeea6fe5a (diff)
downloadgenenetwork3-1c0b72030ce3fdc67bba3fd2d18864dd1cfd9bb0.tar.gz
using match
Diffstat (limited to 'gn3-guile/web')
-rwxr-xr-xgn3-guile/web/webserver.scm9
1 files changed, 3 insertions, 6 deletions
diff --git a/gn3-guile/web/webserver.scm b/gn3-guile/web/webserver.scm
index 6059545..cddd9a5 100755
--- a/gn3-guile/web/webserver.scm
+++ b/gn3-guile/web/webserver.scm
@@ -379,12 +379,9 @@ SELECT ?species ?p ?o WHERE {
(render-json (get-species-meta)))
(('GET id)
(let ([names (get-species-shortnames (get-expanded-species))])
- (if
- (match (string->list "mouse.json")
- [(name ... #\. #\j #\s #\o #\n) (list->string name)]
- [rest #f])
- (render-json name)
- (render-json "WIP"))))
+ (match (string->list id)
+ [(name ... #\. #\j #\s #\o #\n) (render-json (list->string name))]
+ [rest (render-json "WIP")])))
(_ (not-found (request-uri request)))
))