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