chore: lint

This commit is contained in:
izzy
2025-11-21 18:02:27 +00:00
parent 0940c313ac
commit 86d8e1a092
6 changed files with 11 additions and 11 deletions

View File

@@ -114,7 +114,7 @@ export class MaintenanceController {
history: new HistoryBuilder().added('v9.9.9').alpha('v9.9.9'), history: new HistoryBuilder().added('v9.9.9').alpha('v9.9.9'),
}) })
@Authenticated({ permission: Permission.Maintenance, admin: true }) @Authenticated({ permission: Permission.Maintenance, admin: true })
async downloadBackup(@Param() { filename }: FilenameParamDto, @Res() res: Response) { downloadBackup(@Param() { filename }: FilenameParamDto, @Res() res: Response) {
res.header('Content-Disposition', 'attachment'); res.header('Content-Disposition', 'attachment');
res.sendFile(this.service.getBackupPath(filename)); res.sendFile(this.service.getBackupPath(filename));
} }

View File

@@ -71,7 +71,7 @@ export class MaintenanceWorkerController {
@Get('admin/maintenance/backups/:filename') @Get('admin/maintenance/backups/:filename')
@MaintenanceRoute() @MaintenanceRoute()
async downloadBackup(@Param() { filename }: FilenameParamDto, @Res() res: Response) { downloadBackup(@Param() { filename }: FilenameParamDto, @Res() res: Response) {
res.header('Content-Disposition', 'attachment'); res.header('Content-Disposition', 'attachment');
res.sendFile(this.service.getBackupPath(filename)); res.sendFile(this.service.getBackupPath(filename));
} }

View File

@@ -56,8 +56,8 @@ export class BackupService extends BaseService {
const backupsFolder = StorageCore.getBaseFolder(StorageFolder.Backups); const backupsFolder = StorageCore.getBaseFolder(StorageFolder.Backups);
const files = await this.storageRepository.readdir(backupsFolder); const files = await this.storageRepository.readdir(backupsFolder);
const backups = files.filter(isValidRoutineBackupName); const backups = files.filter((fn) => isValidRoutineBackupName(fn));
const failedBackups = files.filter(isFailedBackupName); const failedBackups = files.filter((fn) => isFailedBackupName(fn));
const toDelete = backups.slice(config.keepLastAmount); const toDelete = backups.slice(config.keepLastAmount);
toDelete.push(...failedBackups); toDelete.push(...failedBackups);

View File

@@ -267,8 +267,8 @@ export async function listBackups({ storage }: Pick<BackupRepos, 'storage'>): Pr
const backupsFolder = StorageCore.getBaseFolder(StorageFolder.Backups); const backupsFolder = StorageCore.getBaseFolder(StorageFolder.Backups);
const files = await storage.readdir(backupsFolder); const files = await storage.readdir(backupsFolder);
return files return files
.filter(isValidBackupName) .filter((fn) => isValidBackupName(fn))
.sort((a, b) => (a.startsWith('uploaded-') !== b.startsWith('uploaded-') ? 1 : a.localeCompare(b))) .sort((a, b) => (a.startsWith('uploaded-') === b.startsWith('uploaded-') ? a.localeCompare(b) : 1))
.toReversed(); .toReversed();
} }

View File

@@ -104,7 +104,7 @@
} }
} }
async function download(filename: string) { function download(filename: string) {
location.href = getBaseUrl() + '/admin/maintenance/backups/' + filename; location.href = getBaseUrl() + '/admin/maintenance/backups/' + filename;
} }
@@ -117,7 +117,7 @@
title: 'Download', title: 'Download',
icon: mdiDownload, icon: mdiDownload,
onSelect() { onSelect() {
download(filename); void download(filename);
}, },
}, },
{ {
@@ -125,7 +125,7 @@
icon: mdiTrashCanOutline, icon: mdiTrashCanOutline,
color: 'danger', color: 'danger',
onSelect() { onSelect() {
remove(filename); void remove(filename);
}, },
}, },
], ],

View File

@@ -39,7 +39,7 @@
<CardBody> <CardBody>
<Stack> <Stack>
{#if integrity} {#if integrity}
{#each Object.entries(integrity.storageIntegrity) as [folder, { readable, writable }]} {#each Object.entries(integrity.storageIntegrity) as [folder, { readable, writable }] (folder)}
<HStack> <HStack>
<Icon <Icon
icon={writable ? mdiCheck : mdiClose} icon={writable ? mdiCheck : mdiClose}
@@ -54,7 +54,7 @@
> >
</HStack> </HStack>
{/each} {/each}
{#each Object.entries(integrity.storageHeuristics) as [folder, { files }]} {#each Object.entries(integrity.storageHeuristics) as [folder, { files }] (folder)}
{#if folder !== 'backups'} {#if folder !== 'backups'}
<HStack class="items-start"> <HStack class="items-start">
<Icon <Icon