Initial 智念AIGC platform

This commit is contained in:
inman committed 2026-05-29 10:26:02 +08:00
commit f9c3393f84
86 files changed
+14741

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import { getApiSettings, saveApiSettings } from "@/lib/server/app-settings";
import { jsonError, jsonOk, readJsonBody } from "@/lib/server/api";
export const runtime = "nodejs";
export async function GET() {
try {
return jsonOk(await getApiSettings());
} catch (error) {
return jsonError(error, 500);
}
}
export async function POST(request: Request) {
try {
const body = await readJsonBody<{ values?: Record<string, unknown> }>(request);
return jsonOk(await saveApiSettings(body.values || {}));
} catch (error) {
return jsonError(error, 500);
}
}