Browse Source

Fix backup file download

pull/38/head
Kristijan Mitrovic 4 years ago
parent
commit
1613c160ae
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      src/_services/network.service.js

+ 2
- 3
src/_services/network.service.js View File

@@ -93,9 +93,8 @@ function retrieveBackupPackage(userId, networkId, code, password, backupId, mess
return fetch(
`${config.apiUrl}/users/${userId}/networks/${networkId}/actions/keys/${code}/backups/${backupId}/download`,
util.postWithAuth({ name: 'password', value: password })
).then(util.handleCrudResponse(messages, errors))
.then(netKeyObj => netKeyObj.data)
.then(util.handleDataToDownloadAsFile('restore.' + networkId + '.key', 'text/plain'));
).then(r => r.text())
.then(util.handleDataToDownloadAsFile('backup.' + networkId + '.zip.cpt', 'application/octet-stream'));
}

function getNetworkBackups(userId, networkId, messages, errors) {


Loading…
Cancel
Save