diff --git a/files/routes/search.py b/files/routes/search.py index a0f0b51e5b..15add89ab9 100644 --- a/files/routes/search.py +++ b/files/routes/search.py @@ -160,7 +160,7 @@ def searchposts(v): domain=None domain_obj=None - if request.headers.get("Authorization"): return {"data":[x.json for x in posts]} + if request.headers.get("Authorization"): return {"total":total, "data":[x.json for x in posts]} else: return render_template("search.html", v=v, query=query, @@ -249,7 +249,7 @@ def searchcomments(v): comments = get_comments(ids, v=v) - if request.headers.get("Authorization"): return {"data":[x.json for x in comments]} + if request.headers.get("Authorization"): return {"total":total, "data":[x.json for x in comments]} else: return render_template("search_comments.html", v=v, query=query, total=total, page=page, comments=comments, sort=sort, t=t, next_exists=next_exists)