mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 22:12:24 +01:00
Fix missing types on integer route arguments
This commit is contained in:
parent
461d45b411
commit
adbc2b0195
@ -106,7 +106,7 @@ def create_release(package):
|
||||
return render_template("packages/release_new.html", package=package, form=form)
|
||||
|
||||
|
||||
@bp.route("/packages/<author>/<name>/releases/<id>/download/")
|
||||
@bp.route("/packages/<author>/<name>/releases/<int:id>/download/")
|
||||
@is_package_page
|
||||
def download_release(package, id):
|
||||
release = PackageRelease.query.get(id)
|
||||
@ -144,7 +144,7 @@ def download_release(package, id):
|
||||
return redirect(release.url)
|
||||
|
||||
|
||||
@bp.route("/packages/<author>/<name>/releases/<id>/", methods=["GET", "POST"])
|
||||
@bp.route("/packages/<author>/<name>/releases/<int:id>/", methods=["GET", "POST"])
|
||||
@login_required
|
||||
@is_package_page
|
||||
def edit_release(package, id):
|
||||
@ -227,7 +227,7 @@ def bulk_change_release(package):
|
||||
return render_template("packages/release_bulk_change.html", package=package, form=form)
|
||||
|
||||
|
||||
@bp.route("/packages/<author>/<name>/releases/<id>/delete/", methods=["POST"])
|
||||
@bp.route("/packages/<author>/<name>/releases/<int:id>/delete/", methods=["POST"])
|
||||
@login_required
|
||||
@is_package_page
|
||||
def delete_release(package, id):
|
||||
|
@ -92,7 +92,7 @@ def create_screenshot(package):
|
||||
return render_template("packages/screenshot_new.html", package=package, form=form)
|
||||
|
||||
|
||||
@bp.route("/packages/<author>/<name>/screenshots/<id>/edit/", methods=["GET", "POST"])
|
||||
@bp.route("/packages/<author>/<name>/screenshots/<int:id>/edit/", methods=["GET", "POST"])
|
||||
@login_required
|
||||
@is_package_page
|
||||
def edit_screenshot(package, id):
|
||||
@ -124,7 +124,7 @@ def edit_screenshot(package, id):
|
||||
return render_template("packages/screenshot_edit.html", package=package, screenshot=screenshot, form=form)
|
||||
|
||||
|
||||
@bp.route("/packages/<author>/<name>/screenshots/<id>/delete/", methods=["POST"])
|
||||
@bp.route("/packages/<author>/<name>/screenshots/<int:id>/delete/", methods=["POST"])
|
||||
@login_required
|
||||
@is_package_page
|
||||
def delete_screenshot(package, id):
|
||||
|
@ -39,7 +39,7 @@ def start_getmeta():
|
||||
})
|
||||
|
||||
|
||||
@bp.route("/tasks/<id>/")
|
||||
@bp.route("/tasks/<int:id>/")
|
||||
def check(id):
|
||||
result = celery.AsyncResult(id)
|
||||
status = result.status
|
||||
|
Loading…
Reference in New Issue
Block a user