blob: 17437df8b5a936e4a21daa3eea5be7c280096149 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import { exportDb } from "~/lib/db.server";
export function loader() {
const data = exportDb();
const date = new Date().toISOString().slice(0, 10);
return new Response(JSON.stringify(data, null, 2), {
headers: {
"Content-Type": "application/json",
"Content-Disposition": `attachment; filename="whois-export-${date}.json"`,
},
});
}
export default function () {
return null;
}
|