From 12b3d8158b807609f3f571cbf0603bb067878e9b Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Wed, 7 Aug 2024 17:51:44 +0300 Subject: Use kebab case for Variables. --- web/webserver.scm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'web/webserver.scm') 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))))))) -- cgit v1.2.3