disable /comments on rdrama again

pull/90/head
Aevann 2023-01-21 00:01:09 +02:00
parent 194b63c386
commit 131cf0b456
1 changed files with 25 additions and 24 deletions

View File

@ -218,9 +218,10 @@ def comment_idlist(v=None, page=1, sort="new", t="day", gt=0, lt=0, site=None):
comments = comments.offset(PAGE_SIZE * (page - 1)).limit(PAGE_SIZE + 1).all()
return [x[0] for x in comments]
@app.get("/comments")
@auth_required
def all_comments(v:User):
if SITE != 'rdrama.net':
@app.get("/comments")
@auth_required
def all_comments(v:User):
try: page = max(int(request.values.get("page", 1)), 1)
except: page = 1