Radiator JSON output (#329)
Json output from radiator when Accept header is application/json
This commit is contained in:
committed by
Mike Terzo
parent
9fe0f091f3
commit
333347d113
@@ -1115,6 +1115,10 @@ def radiator(env):
|
|||||||
stats['unchanged_percent'] = 0
|
stats['unchanged_percent'] = 0
|
||||||
stats['unreported_percent'] = 0
|
stats['unreported_percent'] = 0
|
||||||
|
|
||||||
|
if ('Accept' in request.headers and
|
||||||
|
request.headers["Accept"] == 'application/json'):
|
||||||
|
return jsonify(**stats)
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
'radiator.html',
|
'radiator.html',
|
||||||
stats=stats,
|
stats=stats,
|
||||||
|
|||||||
Reference in New Issue
Block a user