diff options
author | Pjotr Prins | 2023-08-07 11:56:33 +0200 |
---|---|---|
committer | Pjotr Prins | 2023-08-07 11:56:33 +0200 |
commit | 34ccdfe012cf11775ad3771e12e649aeabfae3ad (patch) | |
tree | b3576cc7201ce8b81e8c9b9680a7e6af607cc426 /web/webserver.scm | |
parent | 9b9d22605d0581187809865f029541c0381cc164 (diff) | |
download | gn-guile-34ccdfe012cf11775ad3771e12e649aeabfae3ad.tar.gz |
Added first HTML view using code from mumi/dave
Diffstat (limited to 'web/webserver.scm')
-rwxr-xr-x | web/webserver.scm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/web/webserver.scm b/web/webserver.scm index e1a453c..d6f78fe 100755 --- a/web/webserver.scm +++ b/web/webserver.scm @@ -26,7 +26,9 @@ (web uri) (fibers web server) (gn cache memoize) - (gn db sparql)) + (gn db sparql) + (web sxml) + (web view doc)) (define get-version "2.0") @@ -193,9 +195,6 @@ (string-append "Resource X not found: " (uri->string (request-uri request))))) -(define (view-doc path page) - page) - (define (not-found uri) (list (build-response #:code 404) (string-append "Resource not found: " (uri->string uri)))) @@ -204,7 +203,7 @@ (list (append extra-headers '((content-type . (text/html)))) (lambda (port) - (display (view-doc path page) port)))) + (sxml->html (view-doc path page) port)))) (define (render-json json) (list '((content-type . (application/json))) |