Skip to content

Commit

Permalink
Merge pull request #282 from meower-media/tnix-fix-unauthed-home
Browse files Browse the repository at this point in the history
fix: limit home to first page when unauthed
  • Loading branch information
tnix100 authored Aug 14, 2024
2 parents f72eab1 + 40214c7 commit 4122ca4
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 4122ca4

Please sign in to comment.