Skip to content

Commit

Permalink
Merge pull request coollabsio#445 from coollabsio/next
Browse files Browse the repository at this point in the history
v2.9.5
  • Loading branch information
andrasbacsai authored Jun 2, 2022
2 parents 08d7593 + 32d94cb commit 9e81ab4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "coolify",
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
"version": "2.9.4",
"version": "2.9.5",
"license": "AGPL-3.0",
"scripts": {
"dev": "docker-compose -f docker-compose-dev.yaml up -d && cross-env NODE_ENV=development & svelte-kit dev --host 0.0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/routes/databases/[id]/delete.json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down
2 changes: 1 addition & 1 deletion src/routes/databases/[id]/settings.json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion src/routes/databases/[id]/stop.json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ 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 } });

return {
status: 200
};
} catch (error) {
console.log(error);
return ErrorHandler(error);
}
};

0 comments on commit 9e81ab4

Please sign in to comment.