/**
 * Environment Variable Test
 * Shows if Upstash credentials are loaded
 */

import { NextResponse } from "next/server";

export async function GET() {
  return NextResponse.json({
    upstash_url_exists: !!process.env.UPSTASH_REDIS_REST_URL,
    upstash_token_exists: !!process.env.UPSTASH_REDIS_REST_TOKEN,
    upstash_url_format:
      process.env.UPSTASH_REDIS_REST_URL?.substring(0, 20) + "...",
    upstash_token_length: process.env.UPSTASH_REDIS_REST_TOKEN?.length,
    node_env: process.env.NODE_ENV,
  });
}

export const dynamic = "force-dynamic";
