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

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;
}