Skip to content

Commit

Permalink
Record network_address and network_port if specified when creating do…
Browse files Browse the repository at this point in the history
…amin.
  • Loading branch information
Misterblue committed Nov 15, 2020
1 parent f9651d2 commit d45833f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/routes/api/v1/domains.ts
Expand Up @@ -75,6 +75,13 @@ const procPostDomains: RequestHandler = async (req: Request, resp: Response, nex
newDomain.iPAddrOfFirstContact = req.vSenderKey;
};

if (req.body.domain.network_address) {
newDomain.networkAddr = req.body.domain.network_address;
};
if (req.body.domain.network_port) {
newDomain.networkPort = req.body.domain.network_port;
};

// Creating a domain also creates a Place for that domain
// Note that place names are unique so we modify the place name if there is already one.
const newPlacename = await Places.uniqifyPlaceName(newDomain.name);
Expand Down

0 comments on commit d45833f

Please sign in to comment.