ソースを参照

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
};


読み込み中…
キャンセル
保存