Fix the ordering of deleting targets

This commit is contained in:
Owen
2025-10-29 14:40:09 -07:00
parent f5eadc9e1e
commit ca6c45087b

View File

@@ -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();