diff options
author | Alexander_Kabui | 2024-08-07 17:51:44 +0300 |
---|---|---|
committer | Munyoki Kilyungi | 2024-08-09 11:55:16 +0300 |
commit | 12b3d8158b807609f3f571cbf0603bb067878e9b (patch) | |
tree | 43e23bccc787089192f95175587020b2b9411315 /web/webserver.scm | |
parent | 8ece33e22a4eaedc9d65d2fe6f331ccbc96cb258 (diff) | |
download | gn-guile-12b3d8158b807609f3f571cbf0603bb067878e9b.tar.gz |
Use kebab case for Variables.
Diffstat (limited to 'web/webserver.scm')
-rwxr-xr-x | web/webserver.scm | 10 |
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))))))) |