119
This commit is contained in:
parent
02053b836e
commit
46bbcf0d02
@ -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)
|
||||||
|
|
||||||
|
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user