Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <zegerjan@gitlab.com>2016-03-24 15:36:45 +0300
committerZeger-Jan van de Weg <zegerjan@gitlab.com>2016-03-24 20:58:42 +0300
commit3549d7c1d402c10c567c239b006132c45b0c0d1e (patch)
tree40bd6934eb753b8adf3dfaaa57957cdf932dfe1e /lib
parent2c5bcf2e1b5b5574238555657296a8831b989d1e (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')
-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