|
|
@ -3,7 +3,6 @@ import Render from './Render';
|
|
|
|
import StringUtils from '../../src/com/utils/StringUtils';
|
|
|
|
import StringUtils from '../../src/com/utils/StringUtils';
|
|
|
|
import _ from 'lodash';
|
|
|
|
import _ from 'lodash';
|
|
|
|
import Auth from '../data/Auth';
|
|
|
|
import Auth from '../data/Auth';
|
|
|
|
import DataEvent from '../../src/com/events/DataEvent';
|
|
|
|
|
|
|
|
const settings = new Settings();
|
|
|
|
const settings = new Settings();
|
|
|
|
const render = new Render();
|
|
|
|
const render = new Render();
|
|
|
|
const stringUtils = new StringUtils();
|
|
|
|
const stringUtils = new StringUtils();
|
|
|
@ -213,7 +212,7 @@ export default class Utils {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
let folks = JSON.parse(zip.readAsText('settings/folks.json'));
|
|
|
|
let folks = JSON.parse(zip.readAsText('settings/folks.json'));
|
|
|
|
auth.verifyCredentials(folks, credentials)
|
|
|
|
auth.verifyCredentials(folks, credentials)
|
|
|
|
.then(r => {
|
|
|
|
.then(() => {
|
|
|
|
//resolve(r);
|
|
|
|
//resolve(r);
|
|
|
|
self.restoreBackup(file)
|
|
|
|
self.restoreBackup(file)
|
|
|
|
.then(() => {
|
|
|
|
.then(() => {
|
|
|
@ -225,7 +224,7 @@ export default class Utils {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(err => {
|
|
|
|
.catch(err => {
|
|
|
|
response = {
|
|
|
|
response = {
|
|
|
|
type: 'error',
|
|
|
|
type: err,
|
|
|
|
message: 'ERROR RESTORING BACKUP'
|
|
|
|
message: 'ERROR RESTORING BACKUP'
|
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
});
|
|
|
|