版本库问题

dev_jupyter
daiao 5 years ago
parent 88263ec87b
commit 9e405d0215

@ -53,13 +53,15 @@ module GitHelper
end
# 添加目录
def git_add_folder(folder_path, author_name, author_email, message)
GitService.add_tree(file_path: folder_path, message: message, author_name: author_name, author_email: author_email)
def git_add_folder(repo_path, folder_path, author_name, author_email, message)
GitService.add_tree(repo_path: repo_path, file_path: folder_path, message: message, author_name: author_name,
author_email: author_email)
end
# 删除文件
def git_delete_file(file_path, author_name, author_email, message)
GitService.delete_file(file_path: file_path, message: message, author_name: author_name, author_email: author_email)
def git_delete_file(repo_path, file_path, author_name, author_email, message)
GitService.delete_file(repo_path, repo_path, file_path: file_path, message: message, author_name: author_name,
author_email: author_email)
end
# 版本库Fork功能

@ -905,7 +905,7 @@ class ShixunsController < ApplicationController
author_name = current_user.real_name
author_email = current_user.git_mail
message = params[:message] || "upload folder by browser"
git_add_folder(@path, author_name, author_email, message)
git_add_folder(@repo_path, @path, author_name, author_email, message)
render_ok
end
@ -913,7 +913,7 @@ class ShixunsController < ApplicationController
author_name = current_user.real_name
author_email = current_user.git_mail
message = params[:message] || "delete file by browser"
git_delete_file(@path, author_name, author_email, message)
git_delete_file(@repo_path, @path, author_name, author_email, message)
render_ok
end

Loading…
Cancel
Save