forked from rDrama/rDrama
gfgf
parent
d6a6faeb61
commit
14b2c8e9fc
|
@ -379,7 +379,7 @@ def api_comment(v):
|
||||||
c.upvotes += 1
|
c.upvotes += 1
|
||||||
g.db.add(c)
|
g.db.add(c)
|
||||||
|
|
||||||
if "rama" in request.host and len(body) >= 1000 and v.username != "Snappy" and "</blockquote>" not in body_html:
|
if "rama" in request.host and len(c.body) >= 1000 and v.username != "Snappy" and "</blockquote>" not in body_html:
|
||||||
|
|
||||||
body = random.choice(LONGPOST_REPLIES)
|
body = random.choice(LONGPOST_REPLIES)
|
||||||
body = re.sub('([^\n])\n([^\n])', r'\1\n\n\2', body)
|
body = re.sub('([^\n])\n([^\n])', r'\1\n\n\2', body)
|
||||||
|
|
|
@ -192,7 +192,8 @@ def songs(id):
|
||||||
try: id = int(id)
|
try: id = int(id)
|
||||||
except: return "", 400
|
except: return "", 400
|
||||||
user = g.db.query(User).options(lazyload('*')).filter_by(id=id).first()
|
user = g.db.query(User).options(lazyload('*')).filter_by(id=id).first()
|
||||||
return redirect(f"/song/{user.song}.mp3")
|
if user and user.song: return redirect(f"/song/{user.song}.mp3")
|
||||||
|
else: abort(404)
|
||||||
|
|
||||||
@app.get("/song/<song>")
|
@app.get("/song/<song>")
|
||||||
def song(song):
|
def song(song):
|
||||||
|
|
Loading…
Reference in New Issue