debian-mirror-gitlab/lib/api/group_debian_distributions.rb

28 lines
672 B
Ruby
Raw Permalink Normal View History

2021-10-27 15:23:28 +05:30
# frozen_string_literal: true
module API
class GroupDebianDistributions < ::API::Base
params do
2023-03-04 22:38:38 +05:30
requires :id, types: [String, Integer], desc: 'The ID or URL-encoded path of the group'
2021-10-27 15:23:28 +05:30
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
2023-03-17 16:20:25 +05:30
def project_or_group(_ = nil)
2021-10-27 15:23:28 +05:30
user_group
end
end
include ::API::Concerns::Packages::DebianDistributionEndpoints
end
end
end
end