Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: proxy stop missing argument

Andras Bacsai32d94cbe97d7
diff --git a/src/routes/databases/[id]/delete.json.ts b/src/routes/databases/[id]/delete.json.ts
index d731492ad5..71c05130c9 100644
--- a/src/routes/databases/[id]/delete.json.ts
+++ b/src/routes/databases/[id]/delete.json.ts
@@ -12,7 +12,7 @@ export const del: RequestHandler = async (event) => {
const database = await db.getDatabase({ id, teamId });
if (database.destinationDockerId) {
const everStarted = await stopDatabase(database);
- if (everStarted) await stopTcpHttpProxy(database.destinationDocker, database.publicPort);
+ if (everStarted) await stopTcpHttpProxy(id, database.destinationDocker, database.publicPort);
}
await db.removeDatabase({ id });
return { status: 200 };
diff --git a/src/routes/databases/[id]/settings.json.ts b/src/routes/databases/[id]/settings.json.ts
index e4263ce9a1..1c2002890c 100644
--- a/src/routes/databases/[id]/settings.json.ts
+++ b/src/routes/databases/[id]/settings.json.ts
@@ -29,7 +29,7 @@ export const post: RequestHandler = async (event) => {
}
} else {
await db.prisma.database.update({ where: { id }, data: { publicPort: null } });
- await stopTcpHttpProxy(destinationDocker, oldPublicPort);
+ await stopTcpHttpProxy(id, destinationDocker, oldPublicPort);
}
}
return {
diff --git a/src/routes/databases/[id]/stop.json.ts b/src/routes/databases/[id]/stop.json.ts
index 6bd4f4c197..15c5c6e411 100644
--- a/src/routes/databases/[id]/stop.json.ts
+++ b/src/routes/databases/[id]/stop.json.ts
@@ -13,7 +13,7 @@ export const post: RequestHandler = async (event) => {
try {
const database = await db.getDatabase({ id, teamId });
const everStarted = await stopDatabase(database);
- if (everStarted) await stopTcpHttpProxy(database.destinationDocker, database.publicPort);
+ if (everStarted) await stopTcpHttpProxy(id, database.destinationDocker, database.publicPort);
await db.setDatabase({ id, isPublic: false });
await db.prisma.database.update({ where: { id }, data: { publicPort: null } });
@@ -21,6 +21,7 @@ export const post: RequestHandler = async (event) => {
status: 200
};
} catch (error) {
+ console.log(error);
return ErrorHandler(error);
}
};