add pagination to reported posts

pull/146/head
Aevann 2023-05-05 08:16:50 +03:00
parent 6ecfc32317
commit f3ec963708
1 changed files with 2 additions and 10 deletions

View File

@ -329,20 +329,12 @@ def reported_posts(v):
is_approved=None,
is_banned=False,
deleted_utc=0
).join(Submission.flags).order_by(Submission.id.desc()).offset(PAGE_SIZE * (page - 1)).limit(PAGE_SIZE+1)
).join(Submission.flags)
t = time.time()
next_exists = listing.count()
print(t - time.time())
listing = listing.order_by(Submission.id.desc()).offset(PAGE_SIZE * (page - 1)).limit(PAGE_SIZE)
listing = [p.id for p in listing]
t = time.time()
next_exists = len(listing)
print(t - time.time())
return "wtf"
listing = get_posts(listing, v=v)
return render_template("admin/reported_posts.html",