This commit is contained in:
Aritra Banik 2024-03-09 16:18:45 +05:30
parent 421dbf8500
commit 4cedc9fd98

View File

@ -143,7 +143,7 @@ import
ctx.redirect("/cart")
"/checkout" -> [get, post]:
"/cart/checkout" -> [get, post]:
var
db = newDatabase()
cart: seq[Cart] = newSeq[Cart]() # Initialize empty cart
@ -501,7 +501,7 @@ import
ctx &= initCookie("password", password)
if quantity != 0:
ctx.redirect("/checkout?prod=" & productName & "&quantity=" & $quantity)
ctx.redirect("/cart/checkout?prod=" & productName & "&quantity=" & $quantity)
else:
ctx.redirect("/")