This commit is contained in:
Aritra Banik 2024-03-02 19:26:51 +05:30
parent 51121faab8
commit 23763f4c24
2 changed files with 6 additions and 17 deletions

BIN
src/a3

Binary file not shown.

View File

@ -148,23 +148,18 @@ import
var
db = newDatabase()
productName= ""
quantity = 0
cart: seq[Cart]
products: seq[Products]
productCount = 0
ch = ""
cookies = ctx.cookies
qParams = ctx.queryParams
email = cookies.getOrDefault("email", "")
password = cookies.getOrDefault("password", "")
try:
productName = ctx.queryParams["prod"]
quantity = parseInt(ctx.queryParams["quantity"])
except:
productName = ""
quantity = 0
productName = qParams.getOrDefault("prod", "")
quantity = parseInt(qParams.getOrDefault("quantity", "0"))
if email != "":
productCount = micsCartProductCount(email, password)
@ -519,16 +514,10 @@ import
emailError = ""
passwordError = ""
productName: string
quantity: int
qParams = ctx.queryParams
try:
productName = ctx.queryParams["prod"]
quantity = parseInt(ctx.queryParams["quantity"])
except:
productName = ""
quantity = 0
productName = qParams.getOrDefault("prod", "")
quantity = parseInt(qParams.getOrDefault("quantity", "0"))
if user == true: