fluke/devops-service/routes/v2.0/bootstrap_templates.rb
2015-01-26 15:02:58 +03:00

36 lines
859 B
Ruby

module Devops
module Version2_0
module Routes
module BootstrapTemplatesRoutes
extend BootstrapTemplatesCommands
def self.registered(app)
app.before "/templates" do
check_headers :accept
check_privileges("templates", "r")
# broadcast(:cancel_order_failed, "hello")
end
# Get list of available bootstrap templates
#
# * *Request*
# - method : GET
# - headers :
# - Accept: application/json
#
# * *Returns* : array of strings
# [
# "omnibus"
# ]
app.get "/templates", &Devops::Version2_0::Handler::BootstrapTemplates.get_bootstrap_templates
puts "Bootstrap templates routes initialized"
end
end
end
end
end