mirror of
https://github.com/immich-app/immich.git
synced 2025-12-22 01:11:20 +03:00
chore: lint
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user