mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
FIX 解决在线创建文件错误提示信息不准确的问题
This commit is contained in:
@@ -24,8 +24,14 @@ module Gitea
|
||||
|
||||
def run
|
||||
Contents::CreateForm.new(valid_params).validate!
|
||||
response = Gitea::Repository::Entries::CreateService.new(token, owner, @params[:identifier], @params[:filepath], file_params).call
|
||||
render_result(response)
|
||||
result = Gitea::Repository::Entries::CreateService.call(token,
|
||||
owner, @params[:identifier], @params[:filepath], file_params)
|
||||
|
||||
if result[:status] == :success
|
||||
@result = result[:body]
|
||||
else
|
||||
fail!(result[:message])
|
||||
end
|
||||
rescue Exception => exception
|
||||
Rails.logger.info "Exception ===========> #{exception.message}"
|
||||
fail!(exception.message)
|
||||
|
||||
Reference in New Issue
Block a user