aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander_Kabui2024-08-07 17:51:46 +0300
committerMunyoki Kilyungi2024-08-09 11:55:16 +0300
commit8052d004e4065e39d2ddd4a6e9dcc03f2fbee5bb (patch)
treefdee85aefad1f6659d51489ec4e8321e01fcfc4f
parent5298ad1f8b498fbbc82ccfae7b1305458bbd0876 (diff)
downloadgn-guile-8052d004e4065e39d2ddd4a6e9dcc03f2fbee5bb.tar.gz
Refactor: naming convention for global constants.
-rwxr-xr-xweb/webserver.scm8
1 files changed, 4 insertions, 4 deletions
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)