god damn it i keep forgetting to commit to the db
This commit is contained in:
parent
633407ca9d
commit
de04b7db8f
1 changed files with 2 additions and 1 deletions
3
web.py
3
web.py
|
@ -162,6 +162,7 @@ def internal_auth_b():
|
||||||
#user already has an account with CG
|
#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
|
#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']))
|
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()
|
db.close()
|
||||||
return redirect(url_for('log_in'))
|
return redirect(url_for('log_in'))
|
||||||
else:
|
else:
|
||||||
|
@ -199,7 +200,7 @@ def create_password():
|
||||||
#user already exists in database, so they already have a password
|
#user already exists in database, so they already have a password
|
||||||
db.close()
|
db.close()
|
||||||
return redirect(url_for('main'))
|
return redirect(url_for('main'))
|
||||||
|
|
||||||
@app.route('/internal/create_account', methods=['POST'])
|
@app.route('/internal/create_account', methods=['POST'])
|
||||||
def create_account():
|
def create_account():
|
||||||
db, c, dc = db_reconnect()
|
db, c, dc = db_reconnect()
|
||||||
|
|
Loading…
Reference in a new issue