fix: registration enabled/disabled
This commit is contained in:
parent
7b64166fb0
commit
96aef5c4a6
@ -66,15 +66,10 @@ export const post: RequestHandler = async (event) => {
|
||||
const { fqdn, isRegistrationEnabled, dualCerts, minPort, maxPort } = await event.request.json();
|
||||
try {
|
||||
const { id } = await db.listSettings();
|
||||
if (isRegistrationEnabled) {
|
||||
await db.prisma.setting.update({ where: { id }, data: { isRegistrationEnabled } });
|
||||
}
|
||||
await db.prisma.setting.update({ where: { id }, data: { isRegistrationEnabled, dualCerts } });
|
||||
if (fqdn) {
|
||||
await db.prisma.setting.update({ where: { id }, data: { fqdn } });
|
||||
}
|
||||
if (dualCerts) {
|
||||
await db.prisma.setting.update({ where: { id }, data: { dualCerts } });
|
||||
}
|
||||
if (minPort && maxPort) {
|
||||
await db.prisma.setting.update({ where: { id }, data: { minPort, maxPort } });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user