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