forked from MarseyWorld/MarseyWorld
make badges 300px instead
parent
fa4dee419d
commit
cc85cab01d
|
@ -222,7 +222,7 @@ def comment(v):
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
filename = f'files/assets/images/badges/{badge.id}.webp'
|
filename = f'files/assets/images/badges/{badge.id}.webp'
|
||||||
copyfile(oldname, filename)
|
copyfile(oldname, filename)
|
||||||
process_image(filename, resize=400)
|
process_image(filename, resize=300)
|
||||||
requests.post(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/purge_cache', headers=CF_HEADERS,
|
requests.post(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/purge_cache', headers=CF_HEADERS,
|
||||||
data=f'{{"files": ["https://{SITE}/assets/images/badges/{badge.id}.webp"]}}', timeout=5)
|
data=f'{{"files": ["https://{SITE}/assets/images/badges/{badge.id}.webp"]}}', timeout=5)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Reference in New Issue