summaryrefslogtreecommitdiff
path: root/lib/api/namespaces.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/namespaces.rb')
-rw-r--r--lib/api/namespaces.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/api/namespaces.rb b/lib/api/namespaces.rb
index d2468fb1c2e..1f3516e0667 100644
--- a/lib/api/namespaces.rb
+++ b/lib/api/namespaces.rb
@@ -6,8 +6,6 @@ module API
before { authenticate! }
- feature_category :subgroups
-
helpers do
params :optional_list_params_ee do
# EE::API::Namespaces would override this helper
@@ -32,7 +30,7 @@ module API
use :pagination
use :optional_list_params_ee
end
- get do
+ get feature_category: :subgroups do
owned_only = params[:owned_only] == true
namespaces = current_user.admin ? Namespace.all : current_user.namespaces(owned_only: owned_only)
@@ -54,7 +52,7 @@ module API
params do
requires :id, type: String, desc: "Namespace's ID or path"
end
- get ':id', requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
+ get ':id', requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS, feature_category: :subgroups do
user_namespace = find_namespace!(params[:id])
present user_namespace, with: Entities::Namespace, current_user: current_user
@@ -67,7 +65,7 @@ module API
requires :namespace, type: String, desc: "Namespace's path"
optional :parent_id, type: Integer, desc: "The ID of the parent namespace. If no ID is specified, only top-level namespaces are considered."
end
- get ':namespace/exists', requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
+ get ':namespace/exists', requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS, feature_category: :subgroups do
namespace_path = params[:namespace]
exists = Namespace.without_project_namespaces.by_parent(params[:parent_id]).filter_by_path(namespace_path).exists?