mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-03 08:39:09 +00:00
Merge branch 'main' of https://github.com/fosrl/pangolin
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -76,7 +76,7 @@ export function CreateSiteForm() {
|
||||
setIsLoading(false);
|
||||
|
||||
api
|
||||
.get(`/site/pickSiteDefaults`)
|
||||
.get(`/org/${orgId}/pickSiteDefaults`)
|
||||
.catch((e) => {
|
||||
toast({
|
||||
title: "Error creating site..."
|
||||
@@ -93,7 +93,8 @@ export function CreateSiteForm() {
|
||||
const res = await api
|
||||
.put(`/org/${orgId}/site/`, {
|
||||
name: data.name,
|
||||
// subdomain: data.subdomain,
|
||||
subnet: siteDefaults?.subnet,
|
||||
exitNodeId: siteDefaults?.exitNodeId,
|
||||
pubKey: keypair?.publicKey,
|
||||
})
|
||||
.catch((e) => {
|
||||
@@ -117,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`
|
||||
: "";
|
||||
|
||||
Reference in New Issue
Block a user