From ccac05dd90cb5cfa9abbeb11a50f953541eb83bb Mon Sep 17 00:00:00 2001 From: mhasbini Date: Thu, 27 Apr 2017 01:04:07 +0300 Subject: Fix 404 when upstream has disabled merge requests --- lib/api/v3/merge_requests.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/api/v3') diff --git a/lib/api/v3/merge_requests.rb b/lib/api/v3/merge_requests.rb index 3077240e650..1616142a619 100644 --- a/lib/api/v3/merge_requests.rb +++ b/lib/api/v3/merge_requests.rb @@ -23,6 +23,8 @@ module API error!(errors[:validate_fork], 422) elsif errors[:validate_branches].any? conflict!(errors[:validate_branches]) + elsif errors[:base].any? + error!(errors[:base], 422) end render_api_error!(errors, 400) -- cgit v1.2.1 From 43ff7386411af0f538710f3627622f71e5e34472 Mon Sep 17 00:00:00 2001 From: Jarka Kadlecova Date: Mon, 1 May 2017 15:14:35 +0200 Subject: Support uploaders for personal snippets comments --- lib/api/v3/projects.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/api/v3') diff --git a/lib/api/v3/projects.rb b/lib/api/v3/projects.rb index ba9748ada59..06cc704afc6 100644 --- a/lib/api/v3/projects.rb +++ b/lib/api/v3/projects.rb @@ -452,7 +452,7 @@ module API requires :file, type: File, desc: 'The file to be uploaded' end post ":id/uploads" do - ::Projects::UploadService.new(user_project, params[:file]).execute + UploadService.new(user_project, params[:file]).execute end desc 'Get the users list of a project' do -- cgit v1.2.1 From 56f50cbb3a63ae914f50eda3756b49d5cf516207 Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Wed, 8 Mar 2017 17:24:20 +0900 Subject: Fix how to use PipelinesFinder --- lib/api/v3/pipelines.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/api/v3') diff --git a/lib/api/v3/pipelines.rb b/lib/api/v3/pipelines.rb index 82827249244..c48cbd2b765 100644 --- a/lib/api/v3/pipelines.rb +++ b/lib/api/v3/pipelines.rb @@ -21,7 +21,7 @@ module API get ':id/pipelines' do authorize! :read_pipeline, user_project - pipelines = PipelinesFinder.new(user_project).execute(scope: params[:scope]) + pipelines = PipelinesFinder.new(user_project, scope: params[:scope]).execute present paginate(pipelines), with: ::API::Entities::Pipeline end end -- cgit v1.2.1