mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-28 22:00:51 +00:00
Update the public key and the endpoint
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user