Browse Source

probably the final commit

master
Lynne Megido 7 months ago
parent
commit
b0d3dae56d
Signed by: Lynne <thecoolone3@gmail.com> GPG Key ID: FB7B970303ACE499
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      web.py

+ 4
- 1
web.py View File

@@ -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…
Cancel
Save