From 3da7ded2e22fdc8df5fdd81af7f67aef303bd268 Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Mon, 5 Aug 2024 12:06:37 +0300 Subject: Update commit endpoint rename json data. --- web/webserver.scm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'web/webserver.scm') 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)))) )) ) -- cgit v1.2.3