Fix some ui form issues

This commit is contained in:
Owen
2026-05-31 11:57:01 -07:00
parent 3cf6abdf27
commit c1d933259a
9 changed files with 49 additions and 51 deletions

View File

@@ -66,15 +66,12 @@ export default function EditPrivateResourceDialog({
}
}
// "ssh" mode maps to "host" in the backend with SSH settings
const backendMode = data.mode === "ssh" ? "host" : data.mode;
await api.post(`/site-resource/${resource.id}`, {
name: data.name,
siteIds: data.siteIds,
mode: backendMode,
mode: data.mode,
niceId: data.niceId,
destination: data.destination,
destination: data.destination ?? undefined,
...(data.mode === "http" && {
scheme: data.scheme,
ssl: data.ssl ?? false,