mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-03 09:16:40 +00:00
Make sure to push changes
This commit is contained in:
@@ -355,10 +355,14 @@ export async function handleMessagingForUpdatedSiteResource(
|
|||||||
const aliasChanged =
|
const aliasChanged =
|
||||||
existingSiteResource &&
|
existingSiteResource &&
|
||||||
existingSiteResource.alias !== updatedSiteResource.alias;
|
existingSiteResource.alias !== updatedSiteResource.alias;
|
||||||
|
const portRangesChanged =
|
||||||
|
existingSiteResource &&
|
||||||
|
(existingSiteResource.tcpPortRangeString !== updatedSiteResource.tcpPortRangeString ||
|
||||||
|
existingSiteResource.udpPortRangeString !== updatedSiteResource.udpPortRangeString);
|
||||||
|
|
||||||
// if the existingSiteResource is undefined (new resource) we don't need to do anything here, the rebuild above handled it all
|
// if the existingSiteResource is undefined (new resource) we don't need to do anything here, the rebuild above handled it all
|
||||||
|
|
||||||
if (destinationChanged || aliasChanged) {
|
if (destinationChanged || aliasChanged || portRangesChanged) {
|
||||||
const [newt] = await trx
|
const [newt] = await trx
|
||||||
.select()
|
.select()
|
||||||
.from(newts)
|
.from(newts)
|
||||||
@@ -372,7 +376,7 @@ export async function handleMessagingForUpdatedSiteResource(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Only update targets on newt if destination changed
|
// Only update targets on newt if destination changed
|
||||||
if (destinationChanged) {
|
if (destinationChanged || portRangesChanged) {
|
||||||
const oldTargets = generateSubnetProxyTargets(
|
const oldTargets = generateSubnetProxyTargets(
|
||||||
existingSiteResource,
|
existingSiteResource,
|
||||||
mergedAllClients
|
mergedAllClients
|
||||||
|
|||||||
Reference in New Issue
Block a user