From 1c0b72030ce3fdc67bba3fd2d18864dd1cfd9bb0 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 4 Aug 2023 13:43:42 +0200 Subject: using match --- gn3-guile/web/webserver.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'gn3-guile') 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))) )) -- cgit v1.2.3