Skip to content

Commit

Permalink
fixed an issue with ipv6 address creating root server
Browse files Browse the repository at this point in the history
  • Loading branch information
sinamics committed Aug 20, 2023
1 parent 161806e commit c5140a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/server/api/routers/adminRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,6 @@ export const adminRouter = createTRPCRouter({
)

.mutation(async ({ ctx, input }) => {
// console.log(JSON.stringify(input, null, 2));
// return { success: true };
try {
const zerotierOneDir = "/var/lib/zerotier-one";
const mkworldDir = `${zerotierOneDir}/zt-mkworld`;
Expand Down Expand Up @@ -724,7 +722,7 @@ export const adminRouter = createTRPCRouter({
{
comments: `${input.comment || "default.domain"}`,
identity,
endpoints: [input.endpoints],
endpoints: input.endpoints.split(","),
},
],
signing: ["previous.c25519", "current.c25519"],
Expand Down Expand Up @@ -766,7 +764,9 @@ export const adminRouter = createTRPCRouter({
customPlanetUsed: true,
plBirth: config.plBirth,
plID: config.plID,
plEndpoints: config.rootNodes[0].endpoints[0],
plEndpoints: Array.isArray(config.rootNodes[0]?.endpoints)
? config.rootNodes[0].endpoints.join(",")
: null,
plComment: config.rootNodes[0].comments,
plRecommend: config.plRecommend,
plIdentity: config.rootNodes[0].identity,
Expand Down

0 comments on commit c5140a6

Please sign in to comment.