import { NextResponse } from 'next/server';
import { getGoogleAuthUrl } from '@/lib/google-auth';

export async function GET() {
    try {
        const url = getGoogleAuthUrl();
        return NextResponse.json({ url });
    } catch (error) {
        console.error('Failed to generate Google Auth URL:', error);
        return NextResponse.json({ error: 'Internal Server Error' }, { status: 500 });
    }
}
