/**
 * GET /api/social/trends
 * Get cached trends (non-expired)
 */

import { NextResponse } from "next/server";
import { auth } from "@/lib/auth";
import { logger } from "@/lib/logger";
export async function GET() {
  try {
    const session = await auth();
    if (!session?.user?.id) {
      return NextResponse.json(
        { success: false, error: "Unauthorized" },
        { status: 401 },
      );
    }

    // Convex-only — trends not yet migrated, return empty
    return NextResponse.json({ trends: [], success: true });
  } catch (error) {
    logger.error("Failed to get trends", { error });
    return NextResponse.json(
      { success: false, error: "Failed to get trends" },
      { status: 500 },
    );
  }
}
