This commit is contained in:
cereci5049 2024-04-15 13:14:28 +05:30
parent 02053b836e
commit 46bbcf0d02
3 changed files with 7 additions and 1 deletions

BIN
src/a3

Binary file not shown.

View File

@ -69,7 +69,9 @@ proc getOrders*(db: DbConn, userId: int): seq[Orders]=
order.address = row[3] order.address = row[3]
order.state = row[4] order.state = row[4]
order.postalCode = row[5] order.postalCode = row[5]
order.quantity = parseInt(row[6]) order.phoneNumber = row[6]
order.productId = parseInt(row[7])
order.quantity = parseInt(row[8])
orders.add(order) orders.add(order)

View File

@ -12,4 +12,8 @@ proc admin*(ctx: Context): string=
compileTemplateFile(getScriptDir() / "a3a" / "admin" / "index.html") compileTemplateFile(getScriptDir() / "a3a" / "admin" / "index.html")
proc adminShow*(ctx: Context, id: int): string= proc adminShow*(ctx: Context, id: int): string=
var
db = newDatabase()
orders = db.getOrders(id)
compileTemplateFile(getScriptDir() / "a3a" / "admin" / "show.html") compileTemplateFile(getScriptDir() / "a3a" / "admin" / "show.html")