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();
|
const { fqdn, isRegistrationEnabled, dualCerts, minPort, maxPort } = await event.request.json();
|
||||||
try {
|
try {
|
||||||
const { id } = await db.listSettings();
|
const { id } = await db.listSettings();
|
||||||
if (isRegistrationEnabled) {
|
await db.prisma.setting.update({ where: { id }, data: { isRegistrationEnabled, dualCerts } });
|
||||||
await db.prisma.setting.update({ where: { id }, data: { isRegistrationEnabled } });
|
|
||||||
}
|
|
||||||
if (fqdn) {
|
if (fqdn) {
|
||||||
await db.prisma.setting.update({ where: { id }, data: { fqdn } });
|
await db.prisma.setting.update({ where: { id }, data: { fqdn } });
|
||||||
}
|
}
|
||||||
if (dualCerts) {
|
|
||||||
await db.prisma.setting.update({ where: { id }, data: { dualCerts } });
|
|
||||||
}
|
|
||||||
if (minPort && maxPort) {
|
if (minPort && maxPort) {
|
||||||
await db.prisma.setting.update({ where: { id }, data: { minPort, maxPort } });
|
await db.prisma.setting.update({ where: { id }, data: { minPort, maxPort } });
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user