100000000k
This commit is contained in:
parent
fc832182a2
commit
35d071590c
15 changed files with 126 additions and 76 deletions
|
@ -372,9 +372,11 @@ def award_post(pid, v):
|
|||
g.db.add(post.author)
|
||||
|
||||
g.db.commit()
|
||||
if request.referrer and len(request.referrer) > 1 and (request.referrer.startswith('/') or request.referrer.startswith(request.host_url)):
|
||||
return redirect(request.referrer)
|
||||
else: return redirect("/")
|
||||
if request.referrer and len(request.referrer) > 1:
|
||||
if request.referrer == f'{request.host_url}submit': return redirect(post.permalink)
|
||||
elif request.referrer.startswith('/') or request.referrer.startswith(request.host_url):
|
||||
return redirect(request.referrer)
|
||||
return redirect("/")
|
||||
|
||||
|
||||
@app.get("/comment/<cid>/awards")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue