14th Commit
This commit is contained in:
parent
b735bdefb1
commit
c02afc5321
@ -56,8 +56,6 @@ import
|
||||
email: string
|
||||
password: string
|
||||
db = newDatabase()
|
||||
# db3 = newDatabase3()
|
||||
# db1 = newDatabase1()
|
||||
|
||||
try:
|
||||
email = ctx.cookies["email"]
|
||||
@ -87,8 +85,6 @@ import
|
||||
email: string
|
||||
password: string
|
||||
db = newDatabase()
|
||||
# db3 = newDatabase3()
|
||||
# db1 = newDatabase1()
|
||||
|
||||
try:
|
||||
email = ctx.cookies["email"]
|
||||
@ -118,8 +114,6 @@ import
|
||||
email: string
|
||||
password: string
|
||||
db = newDatabase()
|
||||
# db3 = newDatabase3()
|
||||
# db1 = newDatabase1()
|
||||
|
||||
products: seq[Products]
|
||||
|
||||
|
@ -2,14 +2,6 @@ import db_connector/db_sqlite, strutils
|
||||
|
||||
import ../a3pkg/models
|
||||
|
||||
# type
|
||||
# Database = ref object
|
||||
# db: DbConn
|
||||
|
||||
# proc newDatabase3*(filename = "db5.sqlite3"): Database =
|
||||
# new result
|
||||
# result.db = open(filename, "", "", "")
|
||||
|
||||
proc close*(db: DbConn) =
|
||||
db.close()
|
||||
|
||||
|
@ -2,14 +2,6 @@ import db_connector/db_sqlite
|
||||
|
||||
import ../a3pkg/models
|
||||
|
||||
type
|
||||
Database = ref object
|
||||
db: DbConn
|
||||
|
||||
proc newDatabase4*(filename = "db5.sqlite3"): Database =
|
||||
new result
|
||||
result.db = open(filename, "", "", "")
|
||||
|
||||
proc close*(db: DbConn) =
|
||||
db.close()
|
||||
|
||||
|
@ -2,14 +2,6 @@ import db_connector/db_sqlite, strutils
|
||||
|
||||
import ../a3pkg/models
|
||||
|
||||
type
|
||||
Database = ref object
|
||||
db: DbConn
|
||||
|
||||
proc newDatabase1*(filename = "db5.sqlite3"): Database =
|
||||
new result
|
||||
result.db = open(filename, "", "", "")
|
||||
|
||||
proc close*(db: DbConn) =
|
||||
db.close()
|
||||
|
||||
|
@ -4,14 +4,6 @@ import
|
||||
|
||||
import ../a3pkg/models
|
||||
|
||||
# type
|
||||
# Database = ref object
|
||||
# db: DbConn
|
||||
|
||||
# proc newDatabase2*(filename = "db5.sqlite3"): Database =
|
||||
# new result
|
||||
# result.db = open(filename, "", "", "")
|
||||
|
||||
proc close*(db: DbConn) =
|
||||
db.close()
|
||||
|
||||
|
@ -6,14 +6,9 @@ import
|
||||
proc newDatabase*(filename = "db5.sqlite3"): DbConn =
|
||||
result = open(filename, "", "", "")
|
||||
|
||||
# proc newDatabase1*(filename = "db5.sqlite3"): DbConn =
|
||||
# result = open(filename, "", "", "")
|
||||
|
||||
proc micsGetProducts*(email, password: string): seq[Products]=
|
||||
var
|
||||
# db1 = newDatabase1()
|
||||
db = newDatabase()
|
||||
# db3 = newDatabase3()
|
||||
|
||||
userId = db.getUserId(email, password)
|
||||
cart = db.getUserCart(userId)
|
||||
|
Loading…
Reference in New Issue
Block a user