Merge pull request #3699 from Peter-De-Ath/fix-update-user-email-auth

fix auth update_email_by_id - add db.commit
This commit is contained in:
Timothy Jaeryang Baek 2024-07-07 22:58:20 -07:00 committed by GitHub
commit a7fb560e84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -173,6 +173,7 @@ class AuthsTable:
result = ( result = (
db.query(Auth).filter_by(id=id).update({"password": new_password}) db.query(Auth).filter_by(id=id).update({"password": new_password})
) )
db.commit()
return True if result == 1 else False return True if result == 1 else False
except: except:
return False return False
@ -182,6 +183,7 @@ class AuthsTable:
with get_db() as db: with get_db() as db:
result = db.query(Auth).filter_by(id=id).update({"email": email}) result = db.query(Auth).filter_by(id=id).update({"email": email})
db.commit()
return True if result == 1 else False return True if result == 1 else False
except: except:
return False return False