Added all user API

This commit is contained in:
Robbe Van Herck 2018-11-28 14:34:34 +01:00
parent 7f8e6c4a04
commit 0ce0da78d2
No known key found for this signature in database
GPG Key ID: 4D1C8E8FBD1C7188
1 changed files with 4 additions and 0 deletions

View File

@ -35,3 +35,7 @@ def get_user(id):
@app.route("/users/")
def all_users():
return render_template("allusers.html", data=[user.to_obj() for user in User.query.all()])
@app.route("/all")
def all_users_json():
return json.dumps([user.to_obj() for user in User.query.all()])