Преглед на файлове

remove passwords in store

pull/342/head
Guillaume Vincent преди 8 години
родител
ревизия
a759f756a7
променени са 2 файла, в които са добавени 2 реда и са изтрити 10 реда
  1. +0
    -1
      src/components/PasswordGenerator.vue
  2. +2
    -9
      src/store.js

+ 0
- 1
src/components/PasswordGenerator.vue Целия файл

@@ -215,7 +215,6 @@
fetchPasswords(){
Passwords.all().then(response => {
this.passwords = response.data.results;
this.$store.dispatch('setPasswords', response.data.results);
});
},
fetchPassword(id){


+ 2
- 9
src/store.js Целия файл

@@ -10,17 +10,12 @@ const auth = new Auth(storage);

const state = {
authenticated: auth.isAuthenticated(),
email: '',
passwords: []
email: ''
};

const mutations = {
setPasswords(state, passwords){
state.passwords = passwords
},
logout(state){
state.authenticated = false;
state.passwords = [];
},
userAuthenticated(state, user){
state.authenticated = true;
@@ -33,14 +28,12 @@ const actions = {
logout: ({commit}) => {
auth.logout();
commit('logout');
},
setPasswords: ({commit}, password) => commit('setPasswords', password),
}
};

const getters = {
isAuthenticated: state => state.authenticated,
isGuest: state => !state.authenticated,
passwords: state => state.passwords,
email: state => state.email,
baseURL: state => state.baseURL
};


Зареждане…
Отказ
Запис