From 692865ed95877071020698be88acc190f244d155 Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Mon, 5 Aug 2024 13:23:24 +0300 Subject: Use env variable REPO_PATH. --- web/webserver.scm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'web/webserver.scm') diff --git a/web/webserver.scm b/web/webserver.scm index 8ecf3fb..bb07afd 100755 --- a/web/webserver.scm +++ b/web/webserver.scm @@ -176,7 +176,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 "/home/kabui/test_repo") ;; todo ;; fix this + +(define global-repo (getenv "REPO_PATH")) ;; handle this better way + (define (is-invalid-data? data target) (if (string? (assoc-ref data target)) (if (string-null? (assoc-ref data target)) @@ -187,9 +189,6 @@ otherwise search for set/group data" )) (define (commit-file-handler repo request body) - ;; TODO add validations for is email ;; maybe send a request to gn-auth - ;;call gn-auth to validate token - ;; TODO add validation for valid markdown (catch 'system-error (lambda () (let* ((post-data -- cgit v1.2.3