This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/services/dataExport.js
konrad f4c552a79f
All checks were successful
continuous-integration/drone/push Build is passing
User Data Export and import (#699)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: #699
Co-authored-by: konrad <k@knt.li>
Co-committed-by: konrad <k@knt.li>
2021-09-04 19:26:38 +00:00

13 lines
411 B
JavaScript

import AbstractService from './abstractService'
import {downloadBlob} from '../helpers/downloadBlob'
export default class DataExportService extends AbstractService {
request(password) {
return this.post('/user/export/request', {password: password})
}
download(password) {
return this.getBlobUrl('/user/export/download', 'POST', {password})
.then(url => downloadBlob(url, 'vikunja-export.zip'))
}
}