forked from rDrama/rDrama
dffddf
parent
5f97e8b3a9
commit
e494965f94
|
@ -180,6 +180,9 @@ def frontlist(v=None, sort="hot", page=1,t="all", ids_only=True, filter_words=''
|
|||
@app.get("/api/v1/listing")
|
||||
@auth_desired
|
||||
def front_all(v):
|
||||
|
||||
start = time.time()
|
||||
|
||||
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
|
||||
|
||||
try: page = int(request.args.get("page") or 1)
|
||||
|
@ -214,6 +217,9 @@ def front_all(v):
|
|||
# check if ids exist
|
||||
posts = get_posts(ids, v=v)
|
||||
|
||||
print(type(time.time()))
|
||||
print(time.time() - start)
|
||||
|
||||
if request.path == "/": return render_template("home.html", v=v, listing=posts, next_exists=next_exists, sort=sort, t=t, page=page)
|
||||
else: return jsonify({"data": [x.json for x in posts], "next_exists": next_exists})
|
||||
|
||||
|
|
Loading…
Reference in New Issue