diff options
author | rubenwardy <rw@rubenwardy.com> | 2019-01-28 21:31:08 +0000 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2019-01-28 21:33:50 +0000 |
commit | 84b996c489b2003c8da010baf92b748915170974 (patch) | |
tree | 1aa351dd75196487bc2819e886a48af3d9537651 /app/views/api.py | |
parent | d77403c0be04a79693fca4b0a8c6a5b3e06a6177 (diff) | |
download | cheatdb-84b996c489b2003c8da010baf92b748915170974.tar.xz |
Add Minetest version checking to packages API
Diffstat (limited to 'app/views/api.py')
-rw-r--r-- | app/views/api.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/views/api.py b/app/views/api.py index 1e7190a..273ae8e 100644 --- a/app/views/api.py +++ b/app/views/api.py @@ -61,3 +61,9 @@ def topic_set_discard(): db.session.commit() return jsonify(topic.getAsDictionary()) + + +@app.route("/api/minetest_versions/") +def api_minetest_versions_page(): + return jsonify([{ "name": rel.name, "protocol_version": rel.protocol }\ + for rel in MinetestRelease.query.all() if rel.getActual() is not None]) |