fix: remove trailing slash from POST /cart route
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 39s
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:
@@ -157,7 +157,7 @@ def register():
|
|||||||
from models.market import CartItem
|
from models.market import CartItem
|
||||||
from quart import request, url_for
|
from quart import request, url_for
|
||||||
|
|
||||||
@bp.post("/cart/")
|
@bp.post("/cart")
|
||||||
@clear_cache(tag="browse", tag_scope="user")
|
@clear_cache(tag="browse", tag_scope="user")
|
||||||
async def cart(slug: str):
|
async def cart(slug: str):
|
||||||
# make sure product exists (we *allow* deleted_at != None later if you want)
|
# make sure product exists (we *allow* deleted_at != None later if you want)
|
||||||
|
|||||||
Reference in New Issue
Block a user