Skip to content

Commit cacb6d8

Browse files
committed
fix: Fix eslint @typescript-eslint/no-unused-vars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
1 parent 2d97a5d commit cacb6d8

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

src/logger.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
3+
* SPDX-License-Identifier: AGPL-3.0-or-later
4+
*/
5+
import { getLoggerBuilder } from '@nextcloud/logger'
6+
7+
export const logger = getLoggerBuilder()
8+
.setApp('files_zip')
9+
.detectUser()
10+
.build()

src/services.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { t } from '@nextcloud/l10n'
1212
import { generateOcsUrl } from '@nextcloud/router'
1313
import { spawnDialog } from '@nextcloud/vue/functions/dialog'
1414
import CompressFilesModal from './CompressFilesModal.vue'
15+
import { logger } from './logger.ts'
1516

1617
const MAX_COMPRESS_SIZE = loadState('files_zip', 'max_compress_size', -1)
1718

@@ -38,7 +39,9 @@ async function compressFiles(fileIds: number[], target: string) {
3839
target,
3940
})
4041
showSuccess(t('files_zip', 'Creating Zip archive started. We will notify you as soon as the archive is available.'))
41-
} catch (e) {
42+
} catch (error) {
43+
logger.error(error)
44+
4245
showError(t('files_zip', 'An error happened when trying to compress the file.'))
4346
}
4447
}

0 commit comments

Comments
 (0)