15 lines
462 B
TypeScript
15 lines
462 B
TypeScript
import { NextResponse } from "next/server";
|
|
import { getExportacaoDadosCliente } from "@/lib/account-service";
|
|
|
|
export async function GET() {
|
|
const data = await getExportacaoDadosCliente();
|
|
|
|
return new NextResponse(JSON.stringify(data, null, 2), {
|
|
headers: {
|
|
"Content-Type": "application/json; charset=utf-8",
|
|
"Content-Disposition": "attachment; filename=\"meus-dados-briefing.json\"",
|
|
"X-Content-Type-Options": "nosniff"
|
|
}
|
|
});
|
|
}
|