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
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2015-11-22 00:24:34 +0300
committerRobert Schilling <rschilling@student.tugraz.at>2015-11-22 00:24:34 +0300
commit3ea05c5b5b253de33d8bf8d615c66e2935b940ef (patch)
tree486d420d9c21ebe85b5b296685a9328179cb41dd /lib/api/tags.rb
parent6f7e90f6dba300591281aba08ffbe30ce3cc5c90 (diff)
Only allow to create a release if it does not exist yet
Diffstat (limited to 'lib/api/tags.rb')
-rw-r--r--lib/api/tags.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/tags.rb b/lib/api/tags.rb
index 48f630d58e5..e46d9bb96f0 100644
--- a/lib/api/tags.rb
+++ b/lib/api/tags.rb
@@ -47,7 +47,7 @@ module API
# tag_name (required) - The name of the tag
# description (required) - Release notes with markdown support
# Example Request:
- # PUT /projects/:id/repository/tags/:tag_name/release
+ # POST /projects/:id/repository/tags/:tag_name/release
post ':id/repository/tags/:tag_name/release', requirements: { tag_name: /.*/ } do
authorize_push_project
required_attributes! [:description]
@@ -57,7 +57,7 @@ module API
if result[:status] == :success
present result[:release], with: Entities::Release
else
- render_api_error!(result[:message], 404)
+ render_api_error!(result[:message], result[:http_status])
end
end
end