gf
This commit is contained in:
parent
1f3eb88f58
commit
0eec6619d4
1 changed files with 8 additions and 7 deletions
|
@ -1036,14 +1036,15 @@ def unsave_comment(cid, v):
|
||||||
@auth_required
|
@auth_required
|
||||||
def handle_blackjack_action(cid, v):
|
def handle_blackjack_action(cid, v):
|
||||||
comment = get_comment(cid)
|
comment = get_comment(cid)
|
||||||
action = request.values.get("action", "")
|
if 'active' in comment.blackjack_result:
|
||||||
|
action = request.values.get("action", "")
|
||||||
|
|
||||||
if action == 'hit': player_hit(comment)
|
if action == 'hit': player_hit(comment)
|
||||||
elif action == 'stay': player_stayed(comment)
|
elif action == 'stay': player_stayed(comment)
|
||||||
|
|
||||||
g.db.add(comment)
|
g.db.add(comment)
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
return { "message" : "..." }
|
return { "message" : "..." }
|
||||||
|
|
||||||
@app.post("/wordle/<cid>")
|
@app.post("/wordle/<cid>")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue