bbbbbbbbbbbbbb
This commit is contained in:
parent
a0b11d9f8a
commit
83d6bf1ad7
3 changed files with 10 additions and 2 deletions
|
@ -826,7 +826,7 @@ const EMOJIS_STRINGS = [
|
|||
"marseywoah": {"author":"dramarama", "tags":"tldr reaction wall of text wordswordswords stfu"},
|
||||
"marseywolf": {"author":"dramarama", "tags":"halloween werewolf holiday scary monster"},
|
||||
"marseywords": {"author":"dramarama", "tags":"longpost too long tldr reaction wordswordswords"},
|
||||
"marseyworried": {"author":"gigavaccinator", "tags":"anxiety sweat panic scared sweaty sweating anxious nervous stressed"},
|
||||
"marseyworried": {"author":"gigavaccinator", "tags":"monkaw anxiety sweat panic scared sweaty sweating anxious nervous stressed"},
|
||||
"marseywtf": {"author":"chapose", "tags":"scared reaction shook surprised shocked"},
|
||||
"marseywtf2": {"author":"altaccountumbreon", "tags":"shocked reaction wth disturbing disturbed what the fuck"},
|
||||
"marseywut": {"author":"dramarama", "tags":"pathetic asuka"},
|
||||
|
|
|
@ -60,7 +60,8 @@ def remove_admin(v, username):
|
|||
def distribute(v, comment):
|
||||
try: comment = int(comment)
|
||||
except: abort(400)
|
||||
post = g.db.query(Comment).filter_by(id=comment).one_or_none().post
|
||||
post = g.db.query(Comment.parent_submission).filter_by(id=comment).one_or_none()[0]
|
||||
post = g.db.query(Submission).filter_by(id=post).one_or_none()
|
||||
|
||||
pool = 0
|
||||
for option in post.bet_options: pool += option.upvotes
|
||||
|
@ -86,6 +87,9 @@ def distribute(v, comment):
|
|||
votes = g.db.query(CommentVote).filter(CommentVote.comment_id.in_(cids)).all()
|
||||
for vote in votes: add_notif(cid, vote.user.id)
|
||||
|
||||
post.body += '\n\nclosed'
|
||||
g.db.add(post)
|
||||
|
||||
g.db.commit()
|
||||
return {"message": f"Each winner has received {coinsperperson} coins!"}
|
||||
|
||||
|
|
|
@ -873,9 +873,13 @@ def remove_follow(username, v):
|
|||
|
||||
@app.get("/uid/<id>/pic")
|
||||
@app.get("/uid/<id>/pic/profile")
|
||||
@app.get("/logged_out/uid/<id>/pic")
|
||||
@limiter.exempt
|
||||
@auth_desired
|
||||
def user_profile_uid(v, id):
|
||||
if not v and not request.path.startswith('/logged_out'): return redirect(f"/logged_out{request.full_path}")
|
||||
if v and request.path.startswith('/logged_out'): v = None
|
||||
|
||||
try: id = int(id)
|
||||
except:
|
||||
try: id = int(id, 36)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue