diff options
Diffstat (limited to 'app.py')
-rw-r--r-- | app.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -15,19 +15,19 @@ tmpdir = tempfile.TemporaryDirectory() launchpad = Launchpad.login_anonymously("just testing", "production", tmpdir.name, version="devel") -@app.route("/", methods=["GET"]) +@app.route("/") def index_root(): return redirect("/ogayot", code=302) -@app.route("/<LPUSER>", methods=["GET"]) +@app.route("/<LPUSER>") def index_lpuser(LPUSER): lpuser = launchpad.people[LPUSER] return jsonify([ppa.name for ppa in lpuser.ppas]) -@app.route("/<LPUSER>/<PPA>", methods=["GET"]) +@app.route("/<LPUSER>/<PPA>") def index_ppa(LPUSER, PPA): lpuser = launchpad.people[LPUSER] @@ -49,7 +49,7 @@ def index_ppa(LPUSER, PPA): return jsonify(list(set([pkg.source_package_name for pkg in ppa.getPublishedSources()]))) -@app.route("/<LPUSER>/<PPA>/<PACKAGE>", methods=["GET"]) +@app.route("/<LPUSER>/<PPA>/<PACKAGE>") def index_package(LPUSER, PPA, PACKAGE): lpuser = launchpad.people[LPUSER] |