From ca6c45087b34417b089000933a9545701419b1c1 Mon Sep 17 00:00:00 2001 From: Owen Date: Wed, 29 Oct 2025 14:40:09 -0700 Subject: [PATCH] Fix the ordering of deleting targets --- .../[orgId]/settings/resources/[niceId]/proxy/page.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx b/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx index 5ef2ccd5..ac0cd529 100644 --- a/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx +++ b/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx @@ -733,6 +733,10 @@ export default function ReverseProxyTargets(props: { setHttpsTlsLoading(true); setProxySettingsLoading(true); + for (const targetId of targetsToRemove) { + await api.delete(`/target/${targetId}`); + } + // Save targets for (const target of targets) { const data: any = { @@ -775,10 +779,6 @@ export default function ReverseProxyTargets(props: { } } - for (const targetId of targetsToRemove) { - await api.delete(`/target/${targetId}`); - } - if (resource.http) { // Gather all settings const stickySessionData = targetsSettingsForm.getValues();