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

24 lines
535 B
Ruby
Raw Normal View History

2021-01-03 14:25:43 +05:30
# frozen_string_literal: true
module API
class DebianGroupPackages < ::API::Base
params do
requires :id, type: String, desc: 'The ID of a group'
end
resource :groups, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
before do
2021-03-11 19:13:27 +05:30
require_packages_enabled!
2021-01-03 14:25:43 +05:30
not_found! unless ::Feature.enabled?(:debian_packages, user_group)
authorize_read_package!(user_group)
end
2021-03-11 19:13:27 +05:30
namespace ':id/packages/debian' do
2021-01-03 14:25:43 +05:30
include DebianPackageEndpoints
end
end
end
end