feat: add system configuration platform

This commit is contained in:
2026-07-02 00:03:27 -07:00
parent aed5c6db56
commit e3e7b0d8e0
41 changed files with 5746 additions and 405 deletions

View File

@@ -15,11 +15,27 @@ export function jsonSuccess<T extends Record<string, unknown>>(
payload: T,
status = 200,
): Response {
return Response.json({ success: true, reason, ...payload }, { status });
return Response.json(
{ success: true, reason, ...payload },
{
status,
headers: {
"Cache-Control": "no-store",
},
},
);
}
export function jsonFailure(reason: string, status = 400): Response {
return Response.json({ success: false, reason }, { status });
return Response.json(
{ success: false, reason },
{
status,
headers: {
"Cache-Control": "no-store",
},
},
);
}
export async function readJsonBody(request: Request): Promise<unknown> {
@@ -29,4 +45,3 @@ export async function readJsonBody(request: Request): Promise<unknown> {
return null;
}
}