fix(web): Domain.templateId опционален (Go omitempty), String() на error

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-03 17:19:51 +07:00
parent 6f82036e38
commit 267ffc4ed9
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ async function req<T>(path: string, init?: RequestInit): Promise<T> {
})
if (!res.ok) {
let msg = `HTTP ${res.status}`
try { const b = await res.json(); if (b?.error) msg = b.error } catch { /* ignore */ }
try { const b = await res.json(); if (b?.error) msg = String(b.error) } catch { /* ignore */ }
throw new Error(msg)
}
if (res.status === 204) return undefined as T
+1 -1
View File
@@ -10,7 +10,7 @@ export interface Domain {
providerAccountId: string
zoneName: string
zoneId: string
templateId: string | null
templateId?: string | null // Go omitempty: поле может отсутствовать (undefined), а не null
}
export interface CreateDomainInput {
providerAccountId: string