require 'debci/app'
require 'debci/package'

module Debci
  class Home < Debci::App
    get '/' do
      halt(erb(:no_public_browsing)) unless allow_browsing?

      @package_prefixes = Debci::Package.prefixes if allow_browsing?
      erb :index
    end
  end
end
