Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-17 18:08:15 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-17 18:08:15 +0300
commitc2b98d3dbd47ab92c79c702276fe9130d9a28036 (patch)
treebf4071f551fdc12c22b23b2bb66483064e7b9ea9 /lib/api/projects.rb
parentbadb9c1deacbea601b02f88811b7e123589d9251 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index a1fce9e8b20..d1f99ea49ce 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -26,6 +26,14 @@ module API
def verify_update_project_attrs!(project, attrs)
end
+
+ def delete_project(user_project)
+ destroy_conditionally!(user_project) do
+ ::Projects::DestroyService.new(user_project, current_user, {}).async_execute
+ end
+
+ accepted!
+ end
end
helpers do
@@ -404,11 +412,7 @@ module API
delete ":id" do
authorize! :remove_project, user_project
- destroy_conditionally!(user_project) do
- ::Projects::DestroyService.new(user_project, current_user, {}).async_execute
- end
-
- accepted!
+ delete_project(user_project)
end
desc 'Mark this project as forked from another'