User Data Export and import (#699)
Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/699 Co-authored-by: konrad <k@knt.li> Co-committed-by: konrad <k@knt.li>
This commit is contained in:
13
src/services/dataExport.js
Normal file
13
src/services/dataExport.js
Normal file
@ -0,0 +1,13 @@
|
||||
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'))
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user