diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2017-03-02 13:14:13 +0100 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2017-08-28 16:40:25 +0200 |
commit | e80313f9ee5b3495a8713e6ddae111bc8106155b (patch) | |
tree | f1327448ef9e837aedb9fde9a50d6531e42a6112 /lib/api/projects.rb | |
parent | 998afa5f74558be215a924d95aa131a69831ca43 (diff) | |
download | gitlab-ce-e80313f9ee5b3495a8713e6ddae111bc8106155b.tar.gz |
Conditionally destroy a ressource
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r-- | lib/api/projects.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb index eab0ca0b3c9..36fe3f243b9 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -334,9 +334,10 @@ module API desc 'Remove a project' delete ":id" do authorize! :remove_project, user_project - check_unmodified_since(user_project.updated_at) - ::Projects::DestroyService.new(user_project, current_user, {}).async_execute + destroy_conditionally!(user_project) do + ::Projects::DestroyService.new(user_project, current_user, {}).async_execute + end accepted! end |