chore: make const out of export download file name
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Dominik Pschenitschni 2022-06-23 03:31:17 +02:00
parent 9ddb55a5ef
commit 6f8a22140a
Signed by: dpschen
GPG Key ID: B257AC0149F43A77
1 changed files with 3 additions and 1 deletions

View File

@ -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) {
return this.post('/user/export/request', {password: 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()
}