diff options
author | Alexander_Kabui | 2024-08-05 12:06:37 +0300 |
---|---|---|
committer | Alexander_Kabui | 2024-08-05 12:06:37 +0300 |
commit | 3da7ded2e22fdc8df5fdd81af7f67aef303bd268 (patch) | |
tree | 31ec972ea6f5eb044fcf3f70cb27e273b4493ad3 /web/webserver.scm | |
parent | ffd6bf2fa9fc23257a396d4c929477ffe887b6a7 (diff) | |
download | gn-guile-3da7ded2e22fdc8df5fdd81af7f67aef303bd268.tar.gz |
Update commit endpoint rename json data.
Diffstat (limited to 'web/webserver.scm')
-rwxr-xr-x | web/webserver.scm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/web/webserver.scm b/web/webserver.scm index 3a7e8da..8ecf3fb 100755 --- a/web/webserver.scm +++ b/web/webserver.scm @@ -197,22 +197,21 @@ otherwise search for set/group data" ) (_ (for-each (lambda (target) (is-invalid-data? post-data target) - ) '("filename" "content" "username" "email" "commit")) + ) '("filename" "content" "username" "email" "prev_commit")) ) (file-name (assoc-ref post-data "filename")) (content (assoc-ref post-data "content")) (username (assoc-ref post-data "username")) (email (assoc-ref post-data "email")) - (commit-message (assoc-ref post-data "commit")) - (prev-commit (assoc-ref post-data "prev-commit")) + (commit-message (assoc-ref post-data "commit_message")) + (prev-commit (assoc-ref post-data "prev_commit")) ) (build-json-response 200 (commit-file repo file-name content commit-message username email - "")) - )) + prev-commit)))) (lambda (key . args) (let ((msg (car args))) (build-json-response 400 `(("error" . ,key) ("msg" . ,msg)))) )) ) |