From a9ac6eec202ea37e5052d1d31689647a798457a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Tr=C3=A1vn=C3=ADk?= Date: Mon, 1 Dec 2025 16:24:15 +0100 Subject: [PATCH] rename API endpoints for backups and notifications --- app/client/components/export-dialog.tsx | 18 +++++++++--------- .../backups/components/schedule-summary.tsx | 2 +- app/client/modules/backups/routes/backups.tsx | 2 +- .../routes/notification-details.tsx | 2 +- .../notifications/routes/notifications.tsx | 2 +- .../lifecycle/config-export.controller.ts | 12 ++++++------ 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/app/client/components/export-dialog.tsx b/app/client/components/export-dialog.tsx index e732dd0e..93e64b21 100644 --- a/app/client/components/export-dialog.tsx +++ b/app/client/components/export-dialog.tsx @@ -79,7 +79,7 @@ async function exportFromApi(endpoint: string, filename: string, options: Export downloadAsJson(data, filename); } -export type ExportEntityType = "volumes" | "repositories" | "notifications" | "backups" | "full"; +export type ExportEntityType = "volumes" | "repositories" | "notification-destinations" | "backup-schedules" | "full"; type ExportConfig = { endpoint: string; @@ -107,17 +107,17 @@ const exportConfigs: Record = { return identifier ? `repository-${identifier}-config` : "repositories-config"; }, }, - notifications: { - endpoint: "/api/v1/config/export/notifications", - label: "Notification", - labelPlural: "Notifications", + "notification-destinations": { + endpoint: "/api/v1/config/export/notification-destinations", + label: "Notification Destination", + labelPlural: "Notification Destinations", getFilename: (opts) => { const identifier = opts.id ?? opts.name; - return identifier ? `notification-${identifier}-config` : "notifications-config"; + return identifier ? `notification-destination-${identifier}-config` : "notification-destinations-config"; }, }, - backups: { - endpoint: "/api/v1/config/export/backups", + "backup-schedules": { + endpoint: "/api/v1/config/export/backup-schedules", label: "Backup Schedule", labelPlural: "Backup Schedules", getFilename: (opts) => (opts.id ? `backup-schedule-${opts.id}-config` : "backup-schedules-config"), @@ -176,7 +176,7 @@ export function ExportDialog({ const isSingleItem = !!(name || id); const isFullExport = entityType === "full"; // TODO: Volumes will have encrypted secrets (e.g., SMB/NFS credentials) in a future PR - const hasSecrets = entityType !== "backups" && entityType !== "volumes"; + const hasSecrets = entityType !== "backup-schedules" && entityType !== "volumes"; const entityLabel = isSingleItem ? config.label : config.labelPlural; const requiresPassword = includeRecoveryKey || secretsMode === "cleartext"; diff --git a/app/client/modules/backups/components/schedule-summary.tsx b/app/client/modules/backups/components/schedule-summary.tsx index c8b5187b..a9bdbce1 100644 --- a/app/client/modules/backups/components/schedule-summary.tsx +++ b/app/client/modules/backups/components/schedule-summary.tsx @@ -126,7 +126,7 @@ export const ScheduleSummary = (props: Props) => { Edit schedule - + - +