forked from MarseyWorld/MarseyWorld
fdsds
parent
8ad0b22ea3
commit
283963f268
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue