mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-28 22:00:51 +00:00
Fix ws reconnect and change create site
This commit is contained in:
@@ -207,7 +207,7 @@ export async function createSite(
|
||||
await db.transaction(async (trx) => {
|
||||
let newSite: Site;
|
||||
|
||||
if (exitNodeId) {
|
||||
if ((type == "wireguard" || type == "newt") && exitNodeId) {
|
||||
// we are creating a site with an exit node (tunneled)
|
||||
if (!subnet) {
|
||||
return next(
|
||||
@@ -264,12 +264,14 @@ export async function createSite(
|
||||
[newSite] = await trx
|
||||
.insert(sites)
|
||||
.values({
|
||||
exitNodeId: exitNodeId,
|
||||
orgId,
|
||||
name,
|
||||
niceId,
|
||||
address: updatedAddress || null,
|
||||
type,
|
||||
dockerSocketEnabled: type == "newt",
|
||||
dockerSocketEnabled: false,
|
||||
online: true,
|
||||
subnet: "0.0.0.0/0"
|
||||
})
|
||||
.returning();
|
||||
|
||||
Reference in New Issue
Block a user