diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-04-03 13:19:25 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-04-03 13:19:25 +0000 |
commit | df725aec985dc68007e78ac85970663f692f55d4 (patch) | |
tree | 193e40e478fee8509c191c265b9bcb59a08f7c1d /lib/api | |
parent | 136267dd356a88e6db39ad1a15e858da7b3c7361 (diff) | |
parent | b231742687cf08d8663ce34a11f1b64f1fbe4a6a (diff) | |
download | gitlab-ce-df725aec985dc68007e78ac85970663f692f55d4.tar.gz |
Merge branch 'add-ability-to-archive-a-project-via-api-14296' into 'master'
Add endpoints for archiving and unarchiving
Closes #14296
See merge request !3372
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/projects.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 6fcb5261e40..24b31005475 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -244,6 +244,34 @@ module API end end + # Archive project + # + # Parameters: + # id (required) - The ID of a project + # Example Request: + # PUT /projects/:id/archive + post ':id/archive' do + authorize!(:archive_project, user_project) + + user_project.archive! + + present user_project, with: Entities::Project + end + + # Unarchive project + # + # Parameters: + # id (required) - The ID of a project + # Example Request: + # PUT /projects/:id/unarchive + post ':id/unarchive' do + authorize!(:archive_project, user_project) + + user_project.unarchive! + + present user_project, with: Entities::Project + end + # Remove project # # Parameters: |