diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-04 20:06:29 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-04 20:06:29 -0500 |
commit | 51b8b8711b51ac48fe5aea9f6282e9b75b83e65b (patch) | |
tree | 1c5683a9d48337960b5f92b9c643ad211f006ff6 /lib/api/projects.rb | |
parent | 824fecb728ae7534b8ef56aaa6679814f3924cd5 (diff) | |
parent | 67136007933425414293602bc75d2ba4822f2a93 (diff) | |
download | gitlab-ce-51b8b8711b51ac48fe5aea9f6282e9b75b83e65b.tar.gz |
Merge branch 'master' into issue_14800
# Conflicts:
# app/assets/stylesheets/framework/variables.scss
Diffstat (limited to 'lib/api/projects.rb')
-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: |