From 85458609a6cae93a514b31bf1d34a453b299f2ae Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 3 Jan 2020 19:44:41 +0800 Subject: [PATCH 1/2] 1 --- app/controllers/shixuns_controller.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 7b3cb7588..38085a5ac 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -893,7 +893,8 @@ class ShixunsController < ApplicationController content = upload_file.tempfile.read author_name = current_user.real_name author_email = current_user.git_mail - update_file_content(content, @repo_path, @path, author_email, author_name, "upload file by browser") + message = params[:message] || "upload file by browser" + update_file_content(content, @repo_path, @path, author_email, author_name, message) render_ok end @@ -901,14 +902,16 @@ class ShixunsController < ApplicationController def upload_git_folder author_name = current_user.real_name author_email = current_user.git_mail - git_add_folder(@path, author_name, author_email, "upload folder by browser") + message = params[:message] || "upload folder by browser" + git_add_folder(@path, author_name, author_email, message) render_ok end def delete_git_file author_name = current_user.real_name author_email = current_user.git_mail - git_delete_file(@path, author_name, author_email, "delete filer by browser") + message = params[:message] || "delete filer by browser" + git_delete_file(@path, author_name, author_email, message) render_ok end From 479534bd2d28b7d9dc12916f9ac3b60c46645305 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 3 Jan 2020 19:48:46 +0800 Subject: [PATCH 2/2] 1 --- app/controllers/shixuns_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 38085a5ac..f86ade58f 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -910,7 +910,7 @@ class ShixunsController < ApplicationController def delete_git_file author_name = current_user.real_name author_email = current_user.git_mail - message = params[:message] || "delete filer by browser" + message = params[:message] || "delete file by browser" git_delete_file(@path, author_name, author_email, message) render_ok end