mirror of
https://github.com/ershisan99/coolify.git
synced 2026-01-27 12:34:34 +00:00
feat: WP could have custom db
This commit is contained in:
@@ -12,13 +12,24 @@ export const post: RequestHandler = async (event) => {
|
||||
name,
|
||||
fqdn,
|
||||
exposePort,
|
||||
wordpress: { extraConfig, mysqlDatabase }
|
||||
wordpress: { extraConfig, mysqlDatabase, mysqlHost, mysqlPort }
|
||||
} = 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, mysqlDatabase, exposePort });
|
||||
await db.updateWordpress({
|
||||
id,
|
||||
fqdn,
|
||||
name,
|
||||
extraConfig,
|
||||
mysqlDatabase,
|
||||
exposePort,
|
||||
mysqlHost,
|
||||
mysqlPort
|
||||
});
|
||||
return { status: 201 };
|
||||
} catch (error) {
|
||||
return ErrorHandler(error);
|
||||
|
||||
Reference in New Issue
Block a user