aboutsummaryrefslogtreecommitdiff
path: root/web/webserver.scm
diff options
context:
space:
mode:
authorAlexander_Kabui2024-08-07 17:51:44 +0300
committerMunyoki Kilyungi2024-08-09 11:55:16 +0300
commit12b3d8158b807609f3f571cbf0603bb067878e9b (patch)
tree43e23bccc787089192f95175587020b2b9411315 /web/webserver.scm
parent8ece33e22a4eaedc9d65d2fe6f331ccbc96cb258 (diff)
downloadgn-guile-12b3d8158b807609f3f571cbf0603bb067878e9b.tar.gz
Use kebab case for Variables.
Diffstat (limited to 'web/webserver.scm')
-rwxr-xr-xweb/webserver.scm10
1 files changed, 5 insertions, 5 deletions
diff --git a/web/webserver.scm b/web/webserver.scm
index 0dcb5f8..ded9997 100755
--- a/web/webserver.scm
+++ b/web/webserver.scm
@@ -129,10 +129,10 @@ otherwise search for set/group data"
(lambda (port)
(format port "~a" "foo"))))
-(define (build-json-response status_code json)
+(define (build-json-response status-code json)
(list
(build-response
- #:code status_code
+ #:code status-code
#:headers `((content-type . (application/json))))
(lambda (port)
(scm->json json port))))
@@ -157,9 +157,9 @@ otherwise search for set/group data"
(define (edit-file-handler repo request)
(catch 'file-error
(lambda ()
- (let* ((params (decode-query (uri-query (request-uri request)))) (query_path (assoc-ref params 'file_path)))
- (if query_path
- (build-json-response 400 (fetch-file repo query_path))
+ (let* ((params (decode-query (uri-query (request-uri request)))) (query-path (assoc-ref params 'file_path)))
+ (if query-path
+ (build-json-response 400 (fetch-file repo query-path))
(throw 'file-error (string-append "Please provide a valid file path in the query")))))
(lambda (key . args)
(let ((msg (car args))) (build-json-response 400 `(("error" . ,key) ("msg" . ,msg)))))))