def packages(): qb = QueryBuilder(request.args) query = qb.buildPackageQuery() ver = qb.getMinetestVersion() pkgs = [package.getAsDictionaryShort(current_app.config["BASE_URL"], version=ver) \ for package in query.all()] return jsonify([package for package in pkgs if package.get("release")])
def api_packages_page(): qb = QueryBuilder(request.args) query = qb.buildPackageQuery() ver = qb.getMinetestVersion() pkgs = [package.getAsDictionaryShort(app.config["BASE_URL"], version=ver) \ for package in query.all()] return jsonify(pkgs)