import { NextRequest,NextResponse } from 'next/server'; import { syncAllDwz } from '@/lib/dwz';
export async function GET(req:NextRequest){const secret=process.env.CRON_SECRET;if(!secret||req.headers.get('authorization')!==`Bearer ${secret}`)return NextResponse.json({error:'Unauthorized'},{status:401});return NextResponse.json({ok:true,results:await syncAllDwz()});}
