chore: make const out of export download file name
All checks were successful
continuous-integration/drone/pr Build is passing

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

View File

@ -1,6 +1,8 @@
import AbstractService from './abstractService' import AbstractService from './abstractService'
import {downloadBlob} from '../helpers/downloadBlob' import {downloadBlob} from '../helpers/downloadBlob'
const DOWNLOAD_NAME = 'vikunja-export.zip'
export default class DataExportService extends AbstractService { export default class DataExportService extends AbstractService {
request(password) { request(password) {
return this.post('/user/export/request', {password: password}) return this.post('/user/export/request', {password: password})
@ -10,7 +12,7 @@ export default class DataExportService extends AbstractService {
const clear = this.setLoading() const clear = this.setLoading()
try { try {
const url = await this.getBlobUrl('/user/export/download', 'POST', {password}) const url = await this.getBlobUrl('/user/export/download', 'POST', {password})
downloadBlob(url, 'vikunja-export.zip') downloadBlob(url, DOWNLOAD_NAME)
} finally { } finally {
clear() clear()
} }