From 56b919ea1f40487c4937b759081d44dfa3c3e6c5 Mon Sep 17 00:00:00 2001 From: Developer Date: Fri, 26 Jun 2026 09:10:32 +0000 Subject: [PATCH] style(frontend/api): apply formatter to backups.ts and client.ts Convert indentation to tabs and reflow long import lines. No behavior change. Co-authored-by: el Gentleman --- frontend/src/api/backups.ts | 54 ++++++++++++++++++++----------------- frontend/src/api/client.ts | 10 ++++++- 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/frontend/src/api/backups.ts b/frontend/src/api/backups.ts index 90a68a2..afec5d8 100644 --- a/frontend/src/api/backups.ts +++ b/frontend/src/api/backups.ts @@ -1,53 +1,57 @@ import { get, post } from "./shared"; import type { - BackupAlert, - BackupDashboardSummary, - BackupJob, - BackupRun, + BackupAlert, + BackupDashboardSummary, + BackupJob, + BackupRun, } from "../types/backups"; export async function fetchBackupJobs(): Promise { - return get("/api/backups/jobs"); + return get("/api/backups/jobs"); } export async function fetchBackupJob( - jobId: string, + jobId: string, ): Promise<{ job: BackupJob; runs: BackupRun[] }> { - return get<{ job: BackupJob; runs: BackupRun[] }>(`/api/backups/jobs/${jobId}`); + return get<{ job: BackupJob; runs: BackupRun[] }>( + `/api/backups/jobs/${jobId}`, + ); } export async function fetchBackupRuns( - jobId?: string, - status?: string, + jobId?: string, + status?: string, ): Promise { - return get("/api/backups/runs", { - ...(jobId ? { job_id: jobId } : {}), - ...(status ? { status } : {}), - }); + return get("/api/backups/runs", { + ...(jobId ? { job_id: jobId } : {}), + ...(status ? { status } : {}), + }); } export async function fetchBackupRun(runId: string): Promise { - return get(`/api/backups/runs/${runId}`); + return get(`/api/backups/runs/${runId}`); } export async function fetchBackupAlerts( - jobId?: string, - acknowledged?: boolean, - severity?: string, + jobId?: string, + acknowledged?: boolean, + severity?: string, ): Promise { - return get("/api/backups/alerts", { - ...(jobId ? { job_id: jobId } : {}), - ...(acknowledged !== undefined ? { acknowledged: String(acknowledged) } : {}), - ...(severity ? { severity } : {}), - }); + return get("/api/backups/alerts", { + ...(jobId ? { job_id: jobId } : {}), + ...(acknowledged !== undefined + ? { acknowledged: String(acknowledged) } + : {}), + ...(severity ? { severity } : {}), + }); } export async function acknowledgeBackupAlert( - alertId: string, + alertId: string, ): Promise { - return post(`/api/backups/alerts/${alertId}/acknowledge`); + return post(`/api/backups/alerts/${alertId}/acknowledge`); } export async function fetchBackupDashboard(): Promise { - return get("/api/dashboard/backups"); + return get("/api/dashboard/backups"); } diff --git a/frontend/src/api/client.ts b/frontend/src/api/client.ts index 24d9944..f73bba8 100644 --- a/frontend/src/api/client.ts +++ b/frontend/src/api/client.ts @@ -36,7 +36,15 @@ import type { PrometheusStatus, PrometheusTarget, } from "../types"; -import { buildHeaders, buildUrl, del, get, post, postForm, readErrorDetail } from "./shared"; +import { + buildHeaders, + buildUrl, + del, + get, + post, + postForm, + readErrorDetail, +} from "./shared"; // Dashboard (Jellyfin-backed; selected via jellyfin_service_id) export const fetchCounts = (jellyfinServiceId?: string) =>