mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-10 20:02:26 +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`);
|
logger.info(`Updated site ${siteId} with new WG Newt info`);
|
||||||
} else {
|
} 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;
|
site = siteRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user