fix: WP custom db

This commit is contained in:
Andras Bacsai
2022-05-10 18:21:05 +02:00
parent 30781f218c
commit 9586213dd1
3 changed files with 22 additions and 11 deletions

View File

@@ -12,23 +12,25 @@ export const post: RequestHandler = async (event) => {
name,
fqdn,
exposePort,
wordpress: { extraConfig, mysqlDatabase, mysqlHost, mysqlPort }
ownMysql,
wordpress: { extraConfig, mysqlDatabase, mysqlHost, mysqlPort, mysqlUser, mysqlPassword }
} = await event.request.json();
if (fqdn) fqdn = fqdn.toLowerCase();
if (exposePort) exposePort = Number(exposePort);
if (mysqlPort) mysqlPort = Number(mysqlPort);
try {
await db.updateWordpress({
id,
fqdn,
name,
extraConfig,
ownMysql,
mysqlDatabase,
exposePort,
mysqlHost,
mysqlPort
mysqlPort,
mysqlUser,
mysqlPassword
});
return { status: 201 };
} catch (error) {