blob: 850b3d07f201fdebc96392d1f88022436876a2e1 [file] [log] [blame]
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Routes for CL Sniffer."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from chromite.lib import cros_logging as logging
import flask
from lib import trees
app = flask.Flask(__name__)
# This must be done at the top level because gunicorn and nginx does not run us
# as __main__
logging.basicConfig(level=logging.DEBUG)
@app.route('/risk/build/<int:build_id>')
def BuildRisks(build_id):
return flask.jsonify({
'cls': trees.BuildRisks(build_id)
})