예제 #1
0
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")])
예제 #2
0
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)