A community based topic aggregation platform built on atproto
at main 810 B view raw
1package routes 2 3import ( 4 "Coves/internal/api/handlers/communityFeed" 5 "Coves/internal/api/middleware" 6 "Coves/internal/core/communityFeeds" 7 "Coves/internal/core/votes" 8 9 "github.com/go-chi/chi/v5" 10) 11 12// RegisterCommunityFeedRoutes registers feed-related XRPC endpoints 13func RegisterCommunityFeedRoutes( 14 r chi.Router, 15 feedService communityFeeds.Service, 16 voteService votes.Service, 17 authMiddleware *middleware.OAuthAuthMiddleware, 18) { 19 // Create handlers 20 getCommunityHandler := communityFeed.NewGetCommunityHandler(feedService, voteService) 21 22 // GET /xrpc/social.coves.communityFeed.getCommunity 23 // Public endpoint with optional auth for viewer-specific state (vote state) 24 r.With(authMiddleware.OptionalAuth).Get("/xrpc/social.coves.communityFeed.getCommunity", getCommunityHandler.HandleGetCommunity) 25}