probably the final commit
This commit is contained in:
parent
de87d7761b
commit
b0d3dae56d
1 changed files with 4 additions and 1 deletions
5
web.py
5
web.py
|
@ -92,7 +92,10 @@ def home():
|
|||
#update cc avi too
|
||||
r = requests.get("https://curiouscat.me/api/v2/profile?username={}".format(session['cc']))
|
||||
j = r.json()
|
||||
session['ccavi'] = j['userData']['avatar']
|
||||
try:
|
||||
session['ccavi'] = j['userData']['avatar']
|
||||
except:
|
||||
return json.dumps(j)
|
||||
c.execute("UPDATE data SET avi = %s, ccavi = %s WHERE client_id = %s AND instance = %s", (session['avi'], session['ccavi'], session['client_id'], session['instance']))
|
||||
else:
|
||||
c.execute("UPDATE data SET avi = %s WHERE client_id = %s AND instance = %s", (session['avi'], session['client_id'], session['instance']))
|
||||
|
|
Loading…
Reference in a new issue