diff options
author | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-03-24 15:36:45 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-03-24 20:58:42 +0300 |
commit | 3549d7c1d402c10c567c239b006132c45b0c0d1e (patch) | |
tree | 40bd6934eb753b8adf3dfaaa57957cdf932dfe1e /lib/api/projects.rb | |
parent | 2c5bcf2e1b5b5574238555657296a8831b989d1e (diff) |
PUT becomes POST on archiving endpoints
Also the specs have a minor improvement. Mainly the access right spec.
Changes are reflected in the docs
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r-- | lib/api/projects.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb index aa60a39f341..24b31005475 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -250,12 +250,12 @@ module API # id (required) - The ID of a project # Example Request: # PUT /projects/:id/archive - put ':id/archive' do + post ':id/archive' do authorize!(:archive_project, user_project) user_project.archive! - present @project, with: Entities::Project + present user_project, with: Entities::Project end # Unarchive project @@ -264,12 +264,12 @@ module API # id (required) - The ID of a project # Example Request: # PUT /projects/:id/unarchive - put ':id/unarchive' do + post ':id/unarchive' do authorize!(:archive_project, user_project) user_project.unarchive! - present @project, with: Entities::Project + present user_project, with: Entities::Project end # Remove project |