db is persistent now

This commit is contained in:
b3yond 2018-03-22 11:32:43 +01:00
parent 9e09dcea84
commit 235b8524f8

1
db.py
View file

@ -110,6 +110,7 @@ class DB(object):
# create user # create user
self.cur.execute("INSERT INTO user (email, passhash) VALUES(?, ?);", self.cur.execute("INSERT INTO user (email, passhash) VALUES(?, ?);",
(json['email'], json['passhash'])) (json['email'], json['passhash']))
self.conn.commit()
return User(self, self.cur.lastrowid) return User(self, self.cur.lastrowid)
def authenticate(self, email, password): def authenticate(self, email, password):