From 8052d004e4065e39d2ddd4a6e9dcc03f2fbee5bb Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Wed, 7 Aug 2024 17:51:46 +0300 Subject: Refactor: naming convention for global constants. --- web/webserver.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'web/webserver.scm') diff --git a/web/webserver.scm b/web/webserver.scm index 9f278be..2dab5b1 100755 --- a/web/webserver.scm +++ b/web/webserver.scm @@ -164,9 +164,9 @@ otherwise search for set/group data" (lambda (key . args) (let ((msg (car args))) (build-json-response 400 `(("error" . ,key) ("msg" . ,msg))))))) -(define global-repo (getenv "REPO_PATH")) +(define +global-repo+ (getenv "REPO_PATH")) -(define (is-invalid-data? data target) +(define (invalid-data? data target) (if (string? (assoc-ref data target)) (if (string-null? (assoc-ref data target)) (throw 'system-error (format #f "Value for Key *** ~a *** Cannot be Empty" target)) @@ -225,9 +225,9 @@ otherwise search for set/group data" (('GET "species") (render-json (get-species-meta))) (('GET "edit") - (edit-file-handler global-repo request)) + (edit-file-handler +global-repo+ request)) (('POST "commit") - (commit-file-handler global-repo request body)) + (commit-file-handler +global-repo+ request body)) (('GET id) (let ([names (get-species-shortnames (get-expanded-species))]) (match (string->list id) -- cgit v1.2.3