From d45833f889f838bdefe5cf8bfb31d316aad486e5 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 15 Nov 2020 11:20:27 -0800 Subject: [PATCH] Record network_address and network_port if specified when creating doamin. --- src/routes/api/v1/domains.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/routes/api/v1/domains.ts b/src/routes/api/v1/domains.ts index 41dcc09d..e765e7aa 100755 --- a/src/routes/api/v1/domains.ts +++ b/src/routes/api/v1/domains.ts @@ -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);