Update the public key and the endpoint

This commit is contained in:
Owen 2025-02-21 17:23:22 -05:00
parent 6cf3bf0255
commit f99efbb1e9
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD

View file

@ -78,6 +78,16 @@ export const handleGetConfigMessage: MessageHandler = async (context) => {
logger.info(`Updated site ${siteId} with new WG Newt info`);
} else {
// update the endpoint and the public key
const [siteRes] = await db
.update(sites)
.set({
publicKey,
endpoint
})
.where(eq(sites.siteId, siteId))
.returning();
site = siteRes;
}