fixed CC connection process
This commit is contained in:
parent
594a078515
commit
0e5604af47
2 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@
|
|||
<div id='question'>
|
||||
<div id='form-avi' style={{ bg }}></div>
|
||||
<div id='form-avi-label'>{{ session['cc'] }}</div><br />
|
||||
<a href='/home'>Continue</a>
|
||||
<a class='button' href='/home'>Continue</a>
|
||||
</div>
|
||||
{% include 'footer.html' %}
|
||||
</body>
|
||||
|
|
4
web.py
4
web.py
|
@ -225,12 +225,12 @@ def cc_connect_code():
|
|||
|
||||
@app.route('/internal/ccc_c', methods=['POST'])
|
||||
def ccc_c():
|
||||
if request.form['challenge'] != session['cctemp']['challenge']:
|
||||
if int(request.form['challenge']) != session['cctemp']['challenge']:
|
||||
return redirect('/cc_connect/code?invalid')
|
||||
for item in ['cc', 'ccavi']:
|
||||
session[item] = session['cctemp'][item]
|
||||
c.execute("UPDATE data SET cc = %s, ccavi = %s, latest_post = %s, time_between_checks = %s WHERE username = %s AND instance = %s", (session['cc'], session['ccavi'], session['cctemp']['latest_post'], 1, session['username'], session['instance']))
|
||||
redirect('/cc_connect/complete')
|
||||
return redirect('/cc_connect/complete')
|
||||
|
||||
@app.route('/cc_connect/complete')
|
||||
def cc_connect_complete():
|
||||
|
|
Loading…
Reference in a new issue