mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
FIX update repositories api
This commit is contained in:
@@ -23,7 +23,7 @@ module Gitea
|
||||
|
||||
def run
|
||||
Contents::CreateForm.new(valid_params).validate!
|
||||
response = Gitea::Repository::Entries::CreateService.new(user, @params[:repo_identifier], @params[:filepath], file_params).call
|
||||
response = Gitea::Repository::Entries::CreateService.new(user, @params[:identifier], @params[:filepath], file_params).call
|
||||
render_result(response)
|
||||
rescue Exception => exception
|
||||
Rails.logger.info "Exception ===========> #{exception.message}"
|
||||
@@ -45,8 +45,6 @@ module Gitea
|
||||
|
||||
def valid_params
|
||||
{
|
||||
login: @params[:login],
|
||||
repo_identifier: @params[:repo_identifier],
|
||||
filepath: @params[:filepath],
|
||||
branch: @params[:branch],
|
||||
new_branch: @params[:new_branch]
|
||||
|
||||
@@ -23,7 +23,7 @@ module Gitea
|
||||
|
||||
def run
|
||||
Contents::DeleteForm.new(valid_params).validate!
|
||||
response = Gitea::Repository::Entries::DeleteService.new(user, @params[:repo_identifier], @params[:filepath], file_params).call
|
||||
response = Gitea::Repository::Entries::DeleteService.new(user, @params[:identifier], @params[:filepath], file_params).call
|
||||
render_result(response)
|
||||
rescue Exception => exception
|
||||
fail!(exception.message)
|
||||
@@ -46,8 +46,6 @@ module Gitea
|
||||
|
||||
def valid_params
|
||||
{
|
||||
login: @params[:login],
|
||||
repo_identifier: @params[:repo_identifier],
|
||||
filepath: @params[:filepath],
|
||||
sha: @params[:sha]
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ module Gitea
|
||||
|
||||
def run
|
||||
Contents::UpdateForm.new(valid_params).validate!
|
||||
response = Gitea::Repository::Entries::UpdateService.new(user, @params[:repo_identifier], @params[:filepath], file_params).call
|
||||
response = Gitea::Repository::Entries::UpdateService.new(user, @params[:identifier], @params[:filepath], file_params).call
|
||||
render_result(response)
|
||||
rescue Exception => exception
|
||||
fail!(exception.message)
|
||||
@@ -46,8 +46,6 @@ module Gitea
|
||||
|
||||
def valid_params
|
||||
{
|
||||
login: @params[:login],
|
||||
repo_identifier: @params[:repo_identifier],
|
||||
filepath: @params[:filepath],
|
||||
branch: @params[:branch],
|
||||
new_branch: @params[:new_branch],
|
||||
|
||||
Reference in New Issue
Block a user