aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/view/markdown.scm8
-rw-r--r--web/webserver.scm35
2 files changed, 19 insertions, 24 deletions
diff --git a/web/view/markdown.scm b/web/view/markdown.scm
index 653596f..b350a1b 100644
--- a/web/view/markdown.scm
+++ b/web/view/markdown.scm
@@ -120,12 +120,12 @@
(if (zero? git-commit-file)
`(("status" . "201")
("message" . "committed file successfully")
- ("content" unquote content)
- ("commit_sha" unquote git-commit-sha)
- ("commit_message" unquote commit-message))
+ ("content" . ,content)
+ ("commit_sha" . ,git-commit-sha)
+ ("commit_message" . ,commit-message))
`(("status" . "200")
("message" . "Nothing to commit, working tree clean")
- ("commit_sha" unquote git-commit-sha)))))
+ ("commit_sha" . ,git-commit-sha)))))
(#f (throw 'system-error
(format #f "~a File does not exist error" file-path))))
(throw 'system-error
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