Initial 智念AIGC platform

This commit is contained in:
inman
2026-05-29 10:26:02 +08:00
commit f9c3393f84
86 changed files with 14741 additions and 0 deletions

21
app/api/settings/route.ts Normal file
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);
}
}