Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
cleanupAndExit() {
storage.clear((error) => {
if (error) throw error;
// console.log(app.getPath('userData'));
app.exit(0);
});
}
}
logout ({ commit }) {
commit(types.LOGOUT_USER_REQUEST)
storage.clear((err) => {
commit(types.LOGOUT_USER_SUCCESS)
if (err) console.log(`Error clearing storage: ${err}`)
router.push('/')
})
},
new Promise((resolve, reject) => {
storage.clear((err) => {
if (err) {
reject(new Error('Error clear storage'));
}
resolve();
});
})
);