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'),
})
@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.sendFile(this.service.getBackupPath(filename));
}

View File

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

View File

@@ -56,8 +56,8 @@ export class BackupService extends BaseService {
const backupsFolder = StorageCore.getBaseFolder(StorageFolder.Backups);
const files = await this.storageRepository.readdir(backupsFolder);
const backups = files.filter(isValidRoutineBackupName);
const failedBackups = files.filter(isFailedBackupName);
const backups = files.filter((fn) => isValidRoutineBackupName(fn));
const failedBackups = files.filter((fn) => isFailedBackupName(fn));
const toDelete = backups.slice(config.keepLastAmount);
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 files = await storage.readdir(backupsFolder);
return files
.filter(isValidBackupName)
.sort((a, b) => (a.startsWith('uploaded-') !== b.startsWith('uploaded-') ? 1 : a.localeCompare(b)))
.filter((fn) => isValidBackupName(fn))
.sort((a, b) => (a.startsWith('uploaded-') === b.startsWith('uploaded-') ? a.localeCompare(b) : 1))
.toReversed();
}

View File

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

View File

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