summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/projects.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index 7f7d2f8e9a8..e70548d1e85 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -174,11 +174,17 @@ module API
#
# Parameters:
# id (required) - The ID of a project
+ # keep_repo (optional) - If true, then delete the project from the
+ # database but keep the repo, wiki, and satellite on disk.
# Example Request:
# DELETE /projects/:id
delete ":id" do
authorize! :remove_project, user_project
- user_project.destroy
+ ::Projects::DestroyService.new(
+ user_project,
+ current_user,
+ keep_repo: params[:keep_repo]
+ ).execute
end
# Mark this project as forked from another