From 8ece33e22a4eaedc9d65d2fe6f331ccbc96cb258 Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Wed, 7 Aug 2024 17:51:43 +0300 Subject: Markdown code Linting. --- web/webserver.scm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'web/webserver.scm') 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) -- cgit v1.2.3