Commit 0c8e1011 authored by schou's avatar schou
Browse files

views: fix support JSON in show_index by duplicating the index under /branch

parent 5f04d4bb
......@@ -7,6 +7,8 @@ from .models import Vulnerability, PackageVersion, Package
@app.route('/')
@app.route('/branch')
@app.route('/branch/')
@accept('text/html')
def show_index():
return render_template('index.html')
......@@ -153,4 +155,4 @@ def show_package_json_ld(package):
def show_package_version_json_ld(package, version):
p = Package.query.filter_by(package_name=package).first_or_404()
pv = PackageVersion.query.filter_by(package_id=p.package_id, version=version).first_or_404()
return jsonify(pv.to_json_ld())
\ No newline at end of file
return jsonify(pv.to_json_ld())
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment