From b1a7edc1408cb9e4a9113e2649973f2a191594c6 Mon Sep 17 00:00:00 2001 From: godo Date: Tue, 10 Sep 2024 14:47:12 +0800 Subject: [PATCH] change --- godo/localchat/getfiles.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/godo/localchat/getfiles.go b/godo/localchat/getfiles.go index dbc9147..8a41b17 100644 --- a/godo/localchat/getfiles.go +++ b/godo/localchat/getfiles.go @@ -11,7 +11,7 @@ import ( ) type FileList struct { - Files []string `json:"files"` + Files []string `json:"fileList"` } func HandleGetFiles(w http.ResponseWriter, r *http.Request) { @@ -26,6 +26,7 @@ func HandleGetFiles(w http.ResponseWriter, r *http.Request) { http.Error(w, "Invalid request body", http.StatusBadRequest) return } + log.Printf("Received file list: %v", fileList) defer r.Body.Close() baseDir, err := libs.GetOsDir() if err != nil {