A community based topic aggregation platform built on atproto

fix(routes): add OptionalAuth middleware to community list endpoint

The listCommunities endpoint was missing OptionalAuth middleware, which
meant GetUserDID() always returned empty string even for authenticated
requests. This caused viewer.subscribed to never be populated.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+3 -2
+3 -2
internal/api/routes/community.go
··· 21 21 subscribeHandler := community.NewSubscribeHandler(service) 22 22 blockHandler := community.NewBlockHandler(service) 23 23 24 - // Query endpoints (GET) - public access 24 + // Query endpoints (GET) - public access, optional auth for viewer state 25 25 // social.coves.community.get - get a single community by identifier 26 26 r.Get("/xrpc/social.coves.community.get", getHandler.HandleGet) 27 27 28 28 // social.coves.community.list - list communities with filters 29 - r.Get("/xrpc/social.coves.community.list", listHandler.HandleList) 29 + // Uses OptionalAuth to populate viewer.subscribed when authenticated 30 + r.With(authMiddleware.OptionalAuth).Get("/xrpc/social.coves.community.list", listHandler.HandleList) 30 31 31 32 // social.coves.community.search - search communities 32 33 r.Get("/xrpc/social.coves.community.search", searchHandler.HandleSearch)