|
@@ -31,7 +31,7 @@ def get_user( username: str):
|
|
|
if not check_user_exists(username): # if user don't exist
|
|
|
return False
|
|
|
user_dict = next(
|
|
|
- iter(db.query('SELECT * FROM AI_anchor.users where username ="'+username+'"')))
|
|
|
+ iter(db.query('SELECT * FROM users where username ="'+username+'"')))
|
|
|
user = models.User(**user_dict)
|
|
|
return user
|
|
|
|
|
@@ -76,9 +76,9 @@ def get_user_id( username):
|
|
|
return str(first(db.query('SELECT COUNT(*) FROM history_input WHERE user_id ='+str(user_obj['id'])))['COUNT(*)'])
|
|
|
|
|
|
|
|
|
-def email_veri_pass(id):
|
|
|
+def email_veri_pass(name):
|
|
|
db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/AI_anchor?charset=utf8mb4')
|
|
|
- user_obj = first(db.query('SELECT * FROM register_veri_code where user_id ="'+str(id)+'"'))
|
|
|
+ user_obj = first(db.query('SELECT * FROM register_veri_code where username ="'+name+'"'))
|
|
|
if user_obj == None:
|
|
|
return False
|
|
|
else:
|