From f4aec7beaf3aa30a3357fc682a0def2f61e412fd Mon Sep 17 00:00:00 2001 From: rolandpo Date: Wed, 16 Nov 2022 15:25:33 +0100 Subject: [PATCH] add contributors api route --- views/web_views.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/views/web_views.py b/views/web_views.py index 207ba3df0..9b68d7ec7 100644 --- a/views/web_views.py +++ b/views/web_views.py @@ -161,6 +161,12 @@ def team(): return render_template("team.html", contributors=contributors) +@app.route("/contributors", strict_slashes=False) +@app.route("//contributors", strict_slashes=False) +def contributors(): + contributors = db_models.Contributor.query.all() + return jsonify({"contributors": contributors}) + @app.route("/admin", strict_slashes=False) @app.route("//admin", strict_slashes=False) def admin():