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
8 "github.com/go-chi/chi/v5"
9)
10
11// RegisterTimelineRoutes registers timeline-related XRPC endpoints
12func RegisterTimelineRoutes(
13 r chi.Router,
14 timelineService timelineCore.Service,
15 authMiddleware *middleware.AtProtoAuthMiddleware,
16) {
17 // Create handlers
18 getTimelineHandler := timeline.NewGetTimelineHandler(timelineService)
19
20 // GET /xrpc/social.coves.feed.getTimeline
21 // Requires authentication - user must be logged in to see their timeline
22 r.With(authMiddleware.RequireAuth).Get("/xrpc/social.coves.feed.getTimeline", getTimelineHandler.HandleGetTimeline)
23}