Skip to content

Commit

Permalink
fix: limit home to first page when unauthed
Browse files Browse the repository at this point in the history
  • Loading branch information
tnix100 committed Aug 14, 2024
1 parent 98d8a78 commit 40214c7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rest_api/v0/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 40214c7

Please sign in to comment.