god damn it i keep forgetting to commit to the db

This commit is contained in:
Lynne Megido 2018-11-14 01:55:01 +10:00
parent 633407ca9d
commit de04b7db8f
Signed by: lynnesbian
GPG key ID: FB7B970303ACE499

3
web.py
View file

@ -162,6 +162,7 @@ def internal_auth_b():
#user already has an account with CG
#update the user's info to use the new info we just got, then redirect them to the login page
c.execute("UPDATE data SET client_id = %s, client_secret = %s, secret = %s, avi = %s WHERE username = %s AND instance = %s", (session['client_id'], session['client_secret'], session['secret'], session['avi'], session['username'], session['instance']))
db.commit()
db.close()
return redirect(url_for('log_in'))
else:
@ -199,7 +200,7 @@ def create_password():
#user already exists in database, so they already have a password
db.close()
return redirect(url_for('main'))
@app.route('/internal/create_account', methods=['POST'])
def create_account():
db, c, dc = db_reconnect()