From 878c6ea9e17527b3f199f4acf10588e910b5727c Mon Sep 17 00:00:00 2001 From: Dominik Pschenitschni Date: Wed, 28 Sep 2022 13:28:45 +0000 Subject: [PATCH] chore: make const out of export download file name (#2436) Co-authored-by: Dominik Pschenitschni Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/2436 Co-authored-by: Dominik Pschenitschni Co-committed-by: Dominik Pschenitschni --- src/services/dataExport.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/services/dataExport.ts b/src/services/dataExport.ts index 3c4064ac..acbea34d 100644 --- a/src/services/dataExport.ts +++ b/src/services/dataExport.ts @@ -1,6 +1,8 @@ import AbstractService from './abstractService' import {downloadBlob} from '../helpers/downloadBlob' +const DOWNLOAD_NAME = 'vikunja-export.zip' + export default class DataExportService extends AbstractService { request(password: string) { return this.post('/user/export/request', {password}) @@ -10,7 +12,7 @@ export default class DataExportService extends AbstractService { const clear = this.setLoading() try { const url = await this.getBlobUrl('/user/export/download', 'POST', {password}) - downloadBlob(url, 'vikunja-export.zip') + downloadBlob(url, DOWNLOAD_NAME) } finally { clear() }