remotes/1693045480750635534/spooky-22
Aevann1 2021-11-30 16:31:26 +02:00
parent c436424bd1
commit 01746b4297
1 changed files with 4 additions and 2 deletions

View File

@ -6,8 +6,9 @@ from flask import *
from files.__main__ import app, limiter, cache
from sqlalchemy.orm import joinedload
from .front import frontlist
from os import environ
defaultcolor = environ.get("DEFAULT_COLOR", "fff").strip()
defaultcolor = environ.get("DEFAULT_COLOR").strip()
@app.get("/votes")
@limiter.limit("5/second;60/minute;200/hour")
@ -168,7 +169,8 @@ def api_vote_comment(comment_id, new, v):
comment.author.coins += 1
comment.author.truecoins += 1
g.db.add(comment.author)
real = v.profileurl or v.namecolor != defaultcolor or v.customtitle
real = (v.profileurl or v.customtitle)
print(real)
vote = CommentVote(user_id=v.id,
vote_type=new,
comment_id=comment_id,