Delete Technitium zones from the DNS page

A Delete zone button on the open zone of a Technitium provider deletes the zone
and every record in it: the name has to be typed, and the server checks it
against the zone as the provider lists it now (so a stale page, a wrong id or
an internal zone cannot be deleted by mistake). What this app cached of the
zone and its records goes with it. Technitium's own refusal is shown and
nothing is changed. Administrators only, audited with how many records were
cached; the adapter gets an optional deleteZone.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-11-01 22:51:19 +01:00
1 parent 0244f5a8ab
commit 082c524125
10 files changed
+197 -16

No files matched your search

+3
View File
@@ -677,6 +677,8 @@ export interface DnsProviderSummary {
createdAt: string;
/** Whether zones can be made on it from here (Technitium). */
canCreateZones: boolean;
/** Whether zones can be deleted on it from here (Technitium). */
canDeleteZones: boolean;
}
/** A zone to be made: a Primary one, a Secondary one from the servers that hold it, or a Forwarder one that passes questions on. */
@@ -3925,6 +3927,7 @@ export const api = {
},
zones: {
list: (providerId: number) => request<{ zones: DnsZone[] }>(`/api/dns/providers/${providerId}/zones`),
remove: (providerId: number, zoneId: string, name: string) => request<void>(`/api/dns/providers/${providerId}/zones/${encodeURIComponent(zoneId)}`, { method: "DELETE", body: JSON.stringify({ name }) }),
create: (providerId: number, body: NewDnsZoneInput) => request<{ zone: { id: string; name: string } }>(`/api/dns/providers/${providerId}/zones`, { method: "POST", body: JSON.stringify(body) }),
},
records: {