From e9cc48a3aeeb3256adcd6973679b323c70e6b716 Mon Sep 17 00:00:00 2001 From: miloschwartz Date: Fri, 9 May 2025 17:18:42 -0400 Subject: [PATCH] fix bug causing duplicate targets --- src/app/[orgId]/settings/resources/[resourceId]/proxy/page.tsx | 2 ++ src/components/Settings.tsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/[orgId]/settings/resources/[resourceId]/proxy/page.tsx b/src/app/[orgId]/settings/resources/[resourceId]/proxy/page.tsx index 90e05ff8..deefd80d 100644 --- a/src/app/[orgId]/settings/resources/[resourceId]/proxy/page.tsx +++ b/src/app/[orgId]/settings/resources/[resourceId]/proxy/page.tsx @@ -320,8 +320,10 @@ export default function ReverseProxyTargets(props: { AxiosResponse >(`/resource/${params.resourceId}/target`, data); target.targetId = res.data.data.targetId; + target.new = false; } else if (target.updated) { await api.post(`/target/${target.targetId}`, data); + target.updated = false; } } diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx index 7fa689f8..410d3093 100644 --- a/src/components/Settings.tsx +++ b/src/components/Settings.tsx @@ -55,7 +55,7 @@ export function SettingsSectionFooter({ }: { children: React.ReactNode; }) { - return
{children}
; + return
{children}
; } export function SettingsSectionGrid({