A community based topic aggregation platform built on atproto
1package routes 2 3import ( 4 "Coves/internal/api/handlers/timeline" 5 "Coves/internal/api/middleware" 6 timelineCore "Coves/internal/core/timeline" 7 "Coves/internal/core/votes" 8 9 "github.com/go-chi/chi/v5" 10) 11 12// RegisterTimelineRoutes registers timeline-related XRPC endpoints 13func RegisterTimelineRoutes( 14 r chi.Router, 15 timelineService timelineCore.Service, 16 voteService votes.Service, 17 authMiddleware *middleware.OAuthAuthMiddleware, 18) { 19 // Create handlers 20 getTimelineHandler := timeline.NewGetTimelineHandler(timelineService, voteService) 21 22 // GET /xrpc/social.coves.feed.getTimeline 23 // Requires authentication - user must be logged in to see their timeline 24 r.With(authMiddleware.RequireAuth).Get("/xrpc/social.coves.feed.getTimeline", getTimelineHandler.HandleGetTimeline) 25}