forked from rDrama/rDrama
give an error message in /comments to stop bad bug reports
parent
2c2657d613
commit
b13ec4f4c7
|
@ -218,10 +218,12 @@ 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]
|
||||
|
||||
if SITE != 'rdrama.net':
|
||||
@app.get("/comments")
|
||||
@auth_required
|
||||
def all_comments(v:User):
|
||||
if SITE == 'rdrama.net':
|
||||
abort(403, "Temporarily disabled!")
|
||||
|
||||
try: page = max(int(request.values.get("page", 1)), 1)
|
||||
except: page = 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue