community-filter
All checks were successful
Deploy on push / deploy (push) Successful in 6s

This commit is contained in:
Untone 2025-06-30 11:38:22 +03:00
parent 23a6bf66b9
commit 9de86c0fae
2 changed files with 4 additions and 0 deletions

View File

@ -370,6 +370,9 @@ def apply_filters(q: select, filters: dict[str, Any]) -> select:
if by_after: if by_after:
ts = int(by_after) ts = int(by_after)
q = q.filter(Shout.created_at > ts) q = q.filter(Shout.created_at > ts)
by_community = filters.get("community")
if by_community:
q = q.filter(Shout.community == by_community)
return q return q

View File

@ -79,6 +79,7 @@ input LoadShoutsFilters {
featured: Boolean featured: Boolean
reacted: Boolean # requires auth, used in load_shouts_feed reacted: Boolean # requires auth, used in load_shouts_feed
after: Int after: Int
community: Int
} }
input LoadShoutsOptions { input LoadShoutsOptions {