You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@mod.route('/updebate/<int:entries_did>')defup_vote(entries_did):
connection=g.db.session.connection()
g.db.engine.execute(
'update users_user set rating = rating + 1 where id in (select id from users_debates where users_debates.did ="{0}")'.format(entries_did))
g.db.engine.execute(
'update users_debates set rating = rating + 1 where did = "{0}"'.format(entries_did))
# g.db.commit()returnredirect(request.referrer)
Make it so:
@mod.route('/updebate/<int:entries_did>')defup_vote(entries_did):
connection=g.db.session.connection()
g.db.engine.execute(
'update users_user set rating = rating + 1 where id in (select id from users_debates where users_debates.did ="{0}")'.format(entries_did))
g.db.engine.execute(
'update users_debates set rating = rating + 1 where did = "{0}"'.format(entries_did))
socket.send("AEEFIOEF")
returnredirect(request.referrer)
Inside of the upvote function, we need to send these to all connected sockets:
This will real time update vote count.
The text was updated successfully, but these errors were encountered: