+44
internal/api/handlers/comments/errors.go
···
···
+167
internal/api/handlers/comments/get_comments.go
···
···+Timeframe string `json:"timeframe,omitempty"` // Optional: For "top" sort - "hour", "day", "week", "month", "year", "all"
+21
internal/api/handlers/comments/middleware.go
···
···+// OptionalAuthMiddleware wraps the existing OptionalAuth middleware from the middleware package.+// This ensures comment handlers can access viewer identity when available, but don't require authentication.+func OptionalAuthMiddleware(authMiddleware *middleware.AtProtoAuthMiddleware, next http.HandlerFunc) http.Handler {
+37
internal/api/handlers/comments/service_adapter.go
···
···+// This bridges the gap between HTTP-layer concerns (http.Request) and domain-layer concerns (context.Context)+func (a *ServiceAdapter) GetComments(r *http.Request, req *GetCommentsRequest) (*comments.GetCommentsResponse, error) {