066
This commit is contained in:
parent
421dbf8500
commit
4cedc9fd98
@ -143,7 +143,7 @@ import
|
|||||||
|
|
||||||
ctx.redirect("/cart")
|
ctx.redirect("/cart")
|
||||||
|
|
||||||
"/checkout" -> [get, post]:
|
"/cart/checkout" -> [get, post]:
|
||||||
var
|
var
|
||||||
db = newDatabase()
|
db = newDatabase()
|
||||||
cart: seq[Cart] = newSeq[Cart]() # Initialize empty cart
|
cart: seq[Cart] = newSeq[Cart]() # Initialize empty cart
|
||||||
@ -501,7 +501,7 @@ import
|
|||||||
ctx &= initCookie("password", password)
|
ctx &= initCookie("password", password)
|
||||||
|
|
||||||
if quantity != 0:
|
if quantity != 0:
|
||||||
ctx.redirect("/checkout?prod=" & productName & "&quantity=" & $quantity)
|
ctx.redirect("/cart/checkout?prod=" & productName & "&quantity=" & $quantity)
|
||||||
else:
|
else:
|
||||||
|
|
||||||
ctx.redirect("/")
|
ctx.redirect("/")
|
||||||
|
Loading…
Reference in New Issue
Block a user