diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-17 18:08:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-17 18:08:15 +0300 |
commit | c2b98d3dbd47ab92c79c702276fe9130d9a28036 (patch) | |
tree | bf4071f551fdc12c22b23b2bb66483064e7b9ea9 /lib/api/projects.rb | |
parent | badb9c1deacbea601b02f88811b7e123589d9251 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r-- | lib/api/projects.rb | 14 |
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' |