fix: remove trailing slash from POST /cart route
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 39s

Templates generate URLs without trailing slash via market_url(), but
the route required one. POST requests don't get redirected by Werkzeug,
causing a 405 MethodNotAllowed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-10 23:52:25 +00:00
parent 7065acb94d
commit 93e1e6d41e

View File

@@ -157,7 +157,7 @@ def register():
from models.market import CartItem
from quart import request, url_for
@bp.post("/cart/")
@bp.post("/cart")
@clear_cache(tag="browse", tag_scope="user")
async def cart(slug: str):
# make sure product exists (we *allow* deleted_at != None later if you want)