mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-18 03:26:34 +02:00
Save the local endpoints
This commit is contained in:
@@ -48,7 +48,8 @@ export const handleNewtRegisterMessage: MessageHandler = async (context) => {
|
|||||||
pingResults,
|
pingResults,
|
||||||
newtVersion,
|
newtVersion,
|
||||||
backwardsCompatible,
|
backwardsCompatible,
|
||||||
chainId
|
chainId,
|
||||||
|
localEndpoints
|
||||||
} = message.data;
|
} = message.data;
|
||||||
if (!publicKey) {
|
if (!publicKey) {
|
||||||
logger.warn("Public key not provided");
|
logger.warn("Public key not provided");
|
||||||
@@ -131,7 +132,8 @@ export const handleNewtRegisterMessage: MessageHandler = async (context) => {
|
|||||||
.set({
|
.set({
|
||||||
pubKey: publicKey,
|
pubKey: publicKey,
|
||||||
exitNodeId: exitNodeId,
|
exitNodeId: exitNodeId,
|
||||||
subnet: newSubnet
|
subnet: newSubnet,
|
||||||
|
localEndpoints: localEndpoints || null
|
||||||
})
|
})
|
||||||
.where(eq(sites.siteId, siteId))
|
.where(eq(sites.siteId, siteId))
|
||||||
.returning();
|
.returning();
|
||||||
@@ -139,7 +141,8 @@ export const handleNewtRegisterMessage: MessageHandler = async (context) => {
|
|||||||
await db
|
await db
|
||||||
.update(sites)
|
.update(sites)
|
||||||
.set({
|
.set({
|
||||||
pubKey: publicKey
|
pubKey: publicKey,
|
||||||
|
localEndpoints: localEndpoints || null
|
||||||
})
|
})
|
||||||
.where(eq(sites.siteId, siteId))
|
.where(eq(sites.siteId, siteId))
|
||||||
.returning();
|
.returning();
|
||||||
|
|||||||
Reference in New Issue
Block a user