Frontend for port range

This commit is contained in:
Andras Bacsai
2022-02-22 10:35:39 +01:00
parent 80cb1bc129
commit 0c2e028b38
10 changed files with 188 additions and 169 deletions

View File

@@ -78,7 +78,7 @@ export const post: RequestHandler = async (event) => {
};
if (status === 401) return { status, body };
const { fqdn, isRegistrationEnabled, dualCerts } = await event.request.json();
const { fqdn, isRegistrationEnabled, dualCerts, minPort, maxPort } = await event.request.json();
try {
const {
id,
@@ -119,6 +119,9 @@ export const post: RequestHandler = async (event) => {
data: { isCoolifyProxyUsed: true }
});
}
if (minPort && maxPort) {
await db.prisma.setting.update({ where: { id }, data: { minPort, maxPort } });
}
return {
status: 201