chore: make const out of export download file name (#2436)
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
Co-authored-by: Dominik Pschenitschni <mail@celement.de> Reviewed-on: #2436 Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de> Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
This commit is contained in:
parent
ca899d3b51
commit
878c6ea9e1
@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user