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:
authorSebastian Ziebell <sebastian.ziebell@asquera.de>2013-02-09 23:54:52 +0400
committerSebastian Ziebell <sebastian.ziebell@asquera.de>2013-02-10 00:01:17 +0400
commit2bd955961cdb6d0fa7e51e8fbb61581d6b101b05 (patch)
tree869ac4ce5844165dd8f6d764989f39a81c78376b /lib
parent40e7846f3e25b7f679c9dda719c135fca1ef3d5b (diff)
Changed function to `not_found`.
Instead of using funtion `error!` the function `not_found!` is used to return 404 error. Adjusted documentation accordingly.
Diffstat (limited to 'lib')
-rw-r--r--lib/api/projects.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index 5e4c564c14b..d416121a78a 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -230,7 +230,7 @@ module Gitlab
# GET /projects/:id/repository/branches/:branch
get ":id/repository/branches/:branch" do
@branch = user_project.repo.heads.find { |item| item.name == params[:branch] }
- error!("Branch does not exist", 404) if @branch.nil?
+ not_found!("Branch does not exist") if @branch.nil?
present @branch, with: Entities::RepoObject, project: user_project
end