mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-09 14:37:36 +01:00
Fix crash on /api/homepage/ due to invalid response returned
This commit is contained in:
parent
cd39f7b2c6
commit
f714d809f8
@ -434,7 +434,7 @@ def homepage():
|
|||||||
def mapPackages(packages):
|
def mapPackages(packages):
|
||||||
return [pkg.getAsDictionaryKey() for pkg in packages]
|
return [pkg.getAsDictionaryKey() for pkg in packages]
|
||||||
|
|
||||||
return {
|
return jsonify({
|
||||||
"count": count,
|
"count": count,
|
||||||
"downloads": downloads,
|
"downloads": downloads,
|
||||||
"featured": mapPackages(featured),
|
"featured": mapPackages(featured),
|
||||||
@ -444,7 +444,7 @@ def homepage():
|
|||||||
"pop_txp": mapPackages(pop_txp),
|
"pop_txp": mapPackages(pop_txp),
|
||||||
"pop_game": mapPackages(pop_gam),
|
"pop_game": mapPackages(pop_gam),
|
||||||
"high_reviewed": mapPackages(high_reviewed)
|
"high_reviewed": mapPackages(high_reviewed)
|
||||||
}
|
})
|
||||||
|
|
||||||
|
|
||||||
@bp.route("/api/minetest_versions/")
|
@bp.route("/api/minetest_versions/")
|
||||||
|
Loading…
Reference in New Issue
Block a user