summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <zegerjan@gitlab.com>2016-03-24 13:36:45 +0100
committerZeger-Jan van de Weg <zegerjan@gitlab.com>2016-03-24 18:58:42 +0100
commit3549d7c1d402c10c567c239b006132c45b0c0d1e (patch)
tree40bd6934eb753b8adf3dfaaa57957cdf932dfe1e /lib/api
parent2c5bcf2e1b5b5574238555657296a8831b989d1e (diff)
downloadgitlab-ce-3549d7c1d402c10c567c239b006132c45b0c0d1e.tar.gz
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')
-rw-r--r--lib/api/projects.rb8
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