summaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
authorOlivier Gayot <olivier.gayot@sigexec.com>2023-01-22 19:20:09 +0100
committerOlivier Gayot <olivier.gayot@sigexec.com>2023-01-22 19:20:09 +0100
commit83bb94c85a85e42b658bb3e9cc21def2b08c5aff (patch)
tree139d6692359937756edf191562061c2236a3626f /app.py
parent4f64fd88a9270b9a24b2669d8721772ee1b36fa4 (diff)
remove explicit methods
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'app.py')
-rw-r--r--app.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/app.py b/app.py
index d525532..4805101 100644
--- a/app.py
+++ b/app.py
@@ -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]