fluke/devops-service/app/api3/routes/statistic.rb
Tim Lianov 03dc3d8d99 v3
2018-04-04 22:44:39 +03:00

21 lines
453 B
Ruby

module Devops
module API3
module Routes
module StatisticRoutes
def self.registered(app)
app.define_policy :read_statistic, "Read statistic"
app.get_with_headers '/statistic' do
check_policy(:read_statistic)
json Devops::API3::Handler::Statistic.new(request).statistic().map(&:to_hash)
end
puts "Statistic routes initialized"
end
end
end
end
end