aboutsummaryrefslogtreecommitdiff
path: root/web/webserver.scm
diff options
context:
space:
mode:
Diffstat (limited to 'web/webserver.scm')
-rw-r--r--web/webserver.scm35
1 files changed, 15 insertions, 20 deletions
diff --git a/web/webserver.scm b/web/webserver.scm
index 145f192..c92c1ad 100644
--- a/web/webserver.scm
+++ b/web/webserver.scm
@@ -28,7 +28,7 @@
(web view markdown))
(define +info+
- `(("name" . "GeneNetwork REST API") ("version" unquote get-version)
+ `(("name" . "GeneNetwork REST API") ("version" ,get-version)
("comment" . "This is the official REST API for the GeneNetwork service hosted at https://genenetwork.org/")
("license"
("source code (unless otherwise specified)" . "Affero GNU Public License 3.0 (AGPL3)")
@@ -38,11 +38,10 @@
("links" ("species" ,(mk-meta "species")))))
(define +info-meta+
- `(("doc" unquote
- (mk-html "info"))
- ("API" ((unquote (mk-url "species")) . "Get a list of all species")
- ((unquote (mk-url "mouse")) . "Get information on mouse")
- ((unquote (mk-url "datasets")) . "Get a list of datasets"))))
+ `(("doc" ,(mk-html "info"))
+ ("API" ((,(mk-url "species")) . "Get a list of all species")
+ ((,(mk-url "mouse")) . "Get information on mouse")
+ ((,(mk-url "datasets")) . "Get a list of datasets"))))
(define (get-id-data id)
"Get data based on identifier id. If it is a taxon return the taxon data,
@@ -82,11 +81,9 @@ otherwise search for set/group data"
(modified (and stat
(make-time time-utc 0
(stat:mtime stat)))))
- (list `((content-type unquote
- (assoc-ref file-mime-types
- (file-extension file-name)))
- (last-modified unquote
- (time-utc->date modified)))
+ (list `((content-type ,(assoc-ref file-mime-types
+ (file-extension file-name)))
+ (last-modified ,(time-utc->date modified)))
(call-with-input-file file-name
get-bytevector-all))))
@@ -97,11 +94,9 @@ otherwise search for set/group data"
(modified (and stat
(make-time time-utc 0
(stat:mtime stat)))))
- (list `((content-type unquote
- (assoc-ref file-mime-types
- (file-extension path)))
- (last-modified unquote
- (time-utc->date modified)))
+ (list `((content-type ,(assoc-ref file-mime-types
+ (file-extension path)))
+ (last-modified ,(time-utc->date modified)))
(call-with-input-file path
get-bytevector-all))))
@@ -171,8 +166,8 @@ otherwise search for set/group data"
(lambda (key . args)
(let ((msg (car args)))
(build-json-response 400
- `(("error" unquote key)
- ("msg" unquote msg)))))))
+ `(("error" ,key)
+ ("msg" ,msg)))))))
(define +global-repo+
(getenv "REPO_PATH"))
@@ -212,8 +207,8 @@ otherwise search for set/group data"
(lambda (key . args)
(let ((msg (car args)))
(build-json-response 400
- `(("error" unquote key)
- ("msg" unquote msg)))))))
+ `(("error" ,key)
+ ("msg" ,msg)))))))
(define (controller request body)
(match-lambda