diff options
author | Alexander_Kabui | 2024-08-07 17:51:43 +0300 |
---|---|---|
committer | Munyoki Kilyungi | 2024-08-09 11:55:16 +0300 |
commit | 8ece33e22a4eaedc9d65d2fe6f331ccbc96cb258 (patch) | |
tree | 0a3d5c87d8c1e83b2809ed21ef22df598a6f3d9d /web/webserver.scm | |
parent | 7ba2971ae78b46cc2278e50dcc8d4d8ab9111a6f (diff) | |
download | gn-guile-8ece33e22a4eaedc9d65d2fe6f331ccbc96cb258.tar.gz |
Markdown code Linting.
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) |