diff options
Diffstat (limited to 'web/webserver.scm')
-rwxr-xr-x | web/webserver.scm | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/web/webserver.scm b/web/webserver.scm index 72984a1..0dcb5f8 100755 --- a/web/webserver.scm +++ b/web/webserver.scm @@ -39,7 +39,6 @@ (web view doc) (web view markdown)) - (define info `( ("name" . "GeneNetwork REST API") ("version" . ,get-version) @@ -66,8 +65,6 @@ otherwise search for set/group data" taxoninfo (cdr (get-group-data id))))) -;; ---- REST API web server handler - (define (not-found2 request) (values (build-response #:code 404) (string-append "Resource X not found: " @@ -77,7 +74,6 @@ otherwise search for set/group data" (list (build-response #:code 404) (string-append "Resource not found: " (uri->string uri)))) - (define file-mime-types '(("css" . (text/css)) ("js" . (text/javascript)) @@ -133,7 +129,6 @@ otherwise search for set/group data" (lambda (port) (format port "~a" "foo")))) - (define (build-json-response status_code json) (list (build-response @@ -152,7 +147,6 @@ otherwise search for set/group data" '() (json-string->scm (utf8->string body)))) - (define (decode-query-component component) (let* ([index (string-index component #\=)] [key (if index (substring component 0 index) component)] @@ -201,6 +195,7 @@ otherwise search for set/group data" prev-commit)))) (lambda (key . args) (let ((msg (car args))) (build-json-response 400 `(("error" . ,key) ("msg" . ,msg))))))) + (define (controller request body) (match-lambda (('GET) |