summaryrefslogtreecommitdiffstats
path: root/server/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/api')
-rw-r--r--server/api/registration.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/api/registration.js b/server/api/registration.js
index ff0652b..207413c 100644
--- a/server/api/registration.js
+++ b/server/api/registration.js
@@ -184,7 +184,10 @@ noAuthRouter.postAsync('/clients', async (req, res) => {
else if (!ipxe && ipCheck.leased && !ipCheck.error) return res.send({ client: client, ipList: ipCheck.nextIps })
// Set the hostname as clientname if it exists and is not a leased ip.
- if (!ipCheck.leased && ipCheck.name) client.name = ipCheck.name
+ if (!ipCheck.leased) {
+ if (ipCheck.name) client.name = ipCheck.name
+ if (ipCheck.id) dhcp.ref = ipCheck.id
+ }
}
}
}