diff options
author | Pjotr Prins | 2023-08-04 13:43:42 +0200 |
---|---|---|
committer | Pjotr Prins | 2023-08-04 13:43:42 +0200 |
commit | 1c0b72030ce3fdc67bba3fd2d18864dd1cfd9bb0 (patch) | |
tree | 1d0ca4d1fbfdabe714b4c48a6fa3fd1ae5042c15 /gn3-guile/web/webserver.scm | |
parent | d7d9b55eb43b9b905de0419cd26569aaeea6fe5a (diff) | |
download | genenetwork3-1c0b72030ce3fdc67bba3fd2d18864dd1cfd9bb0.tar.gz |
using match
Diffstat (limited to 'gn3-guile/web/webserver.scm')
-rwxr-xr-x | gn3-guile/web/webserver.scm | 9 |
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))) )) |