summaryrefslogtreecommitdiff
path: root/lib/api/namespaces.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2019-04-24 19:39:59 +0200
committerRémy Coutable <remy@rymai.me>2019-04-24 19:39:59 +0200
commitc563e29fb37c482951c17680c7e34bfbfafa4ca0 (patch)
treee2c8ac7911bcbc9630f414ff3634d2313df713b4 /lib/api/namespaces.rb
parent8b2592ee744438711f449062ff2dc26101e57833 (diff)
downloadgitlab-ce-c563e29fb37c482951c17680c7e34bfbfafa4ca0.tar.gz
Get rid of the user_namespace API helper method
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/api/namespaces.rb')
-rw-r--r--lib/api/namespaces.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/namespaces.rb b/lib/api/namespaces.rb
index 3cc09f6ac3f..77ecb3e7cde 100644
--- a/lib/api/namespaces.rb
+++ b/lib/api/namespaces.rb
@@ -44,6 +44,8 @@ module API
requires :id, type: String, desc: "Namespace's ID or path"
end
get ':id', requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
+ user_namespace = find_namespace!(params[:id])
+
present user_namespace, with: Entities::Namespace, current_user: current_user
end
end