master
Aevann1 2021-12-23 17:00:07 +02:00
parent 8ad0b22ea3
commit 283963f268
2 changed files with 6 additions and 2 deletions

View File

@ -18,6 +18,7 @@ from .front import frontlist, changeloglist
from urllib.parse import ParseResult, urlunparse, urlparse, quote
from os import path
import requests
from shutil import copyfile
site = environ.get("DOMAIN").strip()
site_name = environ.get("SITE_NAME").strip()
@ -1028,7 +1029,10 @@ def submit_post(v):
name = f'/images/{time.time()}'.replace('.','')[:-5] + '.webp'
file.save(name)
new_post.url = process_image(name)
new_post.thumburl = process_image(name, True)
name2 = name.replace('.webp', 'r.webp')
copyfile(name, name2)
new_post.thumburl = process_image(name2, True)
elif file.content_type.startswith('video/'):
file.save("video.mp4")

View File

@ -257,7 +257,7 @@ def transfer_coins(v, username):
@limiter.limit("1/second")
@is_not_banned
@validate_formkey
def transfer_coins(v, username):
def transfer_bux(v, username):
receiver = g.db.query(User).filter_by(username=username).first()
if not receiver: return {"error": "That user doesn't exist."}, 404