Working on deployment 2

This commit is contained in:
Owen Schwartz 2024-10-26 19:56:50 -04:00
parent 778491b49f
commit a90347183d
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
3 changed files with 13 additions and 14 deletions

View file

@ -122,7 +122,7 @@ async function getNextAvailableSubnet(): Promise<string> {
}
// replace the last octet with 1
subnet = subnet.split('.').slice(0, 3).join('.') + '.1';
subnet = subnet.split('.').slice(0, 3).join('.') + '.1' + subnet.split('/')[1];
return subnet;
}

View file

@ -68,18 +68,17 @@ export default async function ConfigurationLaytout(
}
let orgs: ListOrgsResponse["orgs"] = [];
try {
const res = await internal.get<AxiosResponse<ListOrgsResponse>>(
`/orgs`,
cookie
);
if (res && res.data.data.orgs) {
orgs = res.data.data.orgs;
}
} catch (e) {
console.error("Error fetching orgs", e);
}
// try {
// const res = await internal.get<AxiosResponse<ListOrgsResponse>>(
// `/orgs`,
// cookie
// );
// if (res && res.data.data.orgs) {
// orgs = res.data.data.orgs;
// }
// } catch (e) {
// console.error("Error fetching orgs", e);
// }
return (
<>
<div className="w-full bg-muted mb-6 select-none sm:px-0 px-3 pt-3">

View file

@ -118,7 +118,7 @@ PrivateKey = ${keypair.privateKey}
[Peer]
PublicKey = ${siteDefaults.publicKey}
AllowedIPs = ${siteDefaults.address}
AllowedIPs = ${siteDefaults.address.split("/")[0]}/32
Endpoint = ${siteDefaults.endpoint}:${siteDefaults.listenPort}
PersistentKeepalive = 5`
: "";