Aktueller Stand
This commit is contained in:
@@ -27,7 +27,8 @@ export async function POST(request: Request) {
|
||||
apiKey,
|
||||
provider,
|
||||
registrationEnabled,
|
||||
publicAccessEnabled
|
||||
publicAccessEnabled,
|
||||
emailVerificationRequired
|
||||
} = body || {};
|
||||
|
||||
if (!provider || !["google", "osm"].includes(provider)) {
|
||||
@@ -59,6 +60,14 @@ export async function POST(request: Request) {
|
||||
create: { key: "registration_enabled", value: registrationValue }
|
||||
});
|
||||
|
||||
const verificationValue =
|
||||
emailVerificationRequired === false ? "false" : "true";
|
||||
await prisma.setting.upsert({
|
||||
where: { key: "email_verification_required" },
|
||||
update: { value: verificationValue },
|
||||
create: { key: "email_verification_required", value: verificationValue }
|
||||
});
|
||||
|
||||
const existing = await getSystemSettings();
|
||||
const nextPublicAccessEnabled =
|
||||
typeof publicAccessEnabled === "boolean"
|
||||
@@ -79,6 +88,7 @@ export async function POST(request: Request) {
|
||||
apiKey: apiKeySetting.value,
|
||||
provider: providerSetting.value,
|
||||
registrationEnabled: registrationValue !== "false",
|
||||
publicAccessEnabled: nextPublicAccessEnabled
|
||||
publicAccessEnabled: nextPublicAccessEnabled,
|
||||
emailVerificationRequired: verificationValue !== "false"
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user