forked from rDrama/rDrama
fdfd
parent
2c1c705619
commit
12c4df6e56
|
@ -76,19 +76,6 @@ def api_vote_post(post_id, new, v):
|
|||
|
||||
new = int(new)
|
||||
|
||||
if new==-1:
|
||||
count=g.db.query(Vote).filter(
|
||||
Vote.user_id.in_(
|
||||
tuple(
|
||||
[v.id]+[x.id for x in v.alts]
|
||||
)
|
||||
),
|
||||
Vote.created_utc > (int(time.time())-3600),
|
||||
Vote.vote_type==-1
|
||||
).count()
|
||||
if count >=15 and v.admin_level==0:
|
||||
return jsonify({"error": "You're doing that too much. Try again later."}), 403
|
||||
|
||||
post = get_post(post_id)
|
||||
|
||||
# check for existing vote
|
||||
|
|
Loading…
Reference in New Issue