From 40214c711bf80bba452645fa67eb89f52bd0ef8d Mon Sep 17 00:00:00 2001 From: Tnix Date: Wed, 14 Aug 2024 17:40:19 +1200 Subject: [PATCH] fix: limit home to first page when unauthed --- rest_api/v0/home.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rest_api/v0/home.py b/rest_api/v0/home.py index 494d3e5..898697c 100644 --- a/rest_api/v0/home.py +++ b/rest_api/v0/home.py @@ -31,6 +31,8 @@ class Config: @home_bp.get("/") @validate_querystring(GetHomeQueryArgs) async def get_home_posts(query_args: GetHomeQueryArgs): + if not request.user: + query_args.page = 1 query = {"post_origin": "home", "isDeleted": False} return { "error": False,