simpse / src /app /api /test-csv /route.ts
canboi99's picture
Deploy Simpse real estate platform with Vancouver multifamily building interactive map
0d2425e verified
Raw
History Blame Contribute Delete
803 Bytes
import { NextResponse } from 'next/server'
export async function GET() {
try {
// Test if we can fetch the CSV files
const existingResponse = await fetch('http://localhost:3001/data/vancouver-existing-mf.csv')
const proposedResponse = await fetch('http://localhost:3001/data/vancouver-proposed-mf.csv')
return NextResponse.json({
existing: {
status: existingResponse.status,
ok: existingResponse.ok,
headers: Object.fromEntries(existingResponse.headers.entries())
},
proposed: {
status: proposedResponse.status,
ok: proposedResponse.ok,
headers: Object.fromEntries(proposedResponse.headers.entries())
}
})
} catch (error) {
return NextResponse.json({ error: error.message }, { status: 500 })
}
}