debian-mirror-gitlab/lib/api/group_debian_distributions.rb
2022-08-13 15:12:31 +05:30

31 lines
694 B
Ruby

# frozen_string_literal: true
module API
class GroupDebianDistributions < ::API::Base
params do
requires :id, type: String, desc: 'The ID of a group'
end
before do
not_found! if Gitlab::FIPS.enabled?
end
resource :groups, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
after_validation do
require_packages_enabled!
not_found! unless ::Feature.enabled?(:debian_group_packages, user_group)
end
namespace ':id/-' do
helpers do
def project_or_group
user_group
end
end
include ::API::Concerns::Packages::DebianDistributionEndpoints
end
end
end
end