优化图文页

This commit is contained in:
2026-04-28 17:11:42 +08:00
parent 674c202264
commit 040273586b
69 changed files with 3939 additions and 2302 deletions
+6 -3
View File
@@ -1,10 +1,13 @@
// lib/json.ts
export function json(data: unknown, init?: ResponseInit) {
return new Response(
JSON.stringify(data, (_k, v) => (typeof v === 'bigint' ? v.toString() : v)),
JSON.stringify(data, (_k, v) => (typeof v === "bigint" ? v.toString() : v)),
{
...init,
headers: { 'content-type': 'application/json; charset=utf-8', ...(init?.headers || {}) },
}
headers: {
"content-type": "application/json; charset=utf-8",
...(init?.headers || {}),
},
},
);
}