Explorar el Código

clean useless actions

pull/342/head
Guillaume Vincent hace 8 años
padre
commit
1dd60621d3
Se han modificado 3 ficheros con 5 adiciones y 12 borrados
  1. +2
    -12
      src/store.js
  2. +0
    -0
      src/store/mutations.js
  3. +3
    -0
      test/store.js

+ 2
- 12
src/store.js Ver fichero

@@ -43,7 +43,7 @@ const state = {
version: versionLoadedByDefault
};

const mutations = {
export const mutations = {
LOGOUT(state){
state.authenticated = false;
},
@@ -58,7 +58,7 @@ const mutations = {
state.password = password;
},
DELETE_PASSWORD(state, {id}){
var passwords = state.passwords;
const passwords = state.passwords;
state.passwords = passwords.filter(password => {
return password.id !== id;
});
@@ -99,7 +99,6 @@ const mutations = {
};

const actions = {
USER_AUTHENTICATED: ({commit}, user) => commit('USER_AUTHENTICATED', user),
LOGOUT: ({commit}) => {
auth.logout();
commit('LOGOUT');
@@ -128,12 +127,6 @@ const actions = {
});
}
},
PASSWORD_CHANGE({commit}, {password}){
commit('SET_PASSWORD', {password});
},
PASSWORD_GENERATED: ({commit}) => {
commit('CHANGE_PASSWORD_STATUS', 'DIRTY');
},
FETCH_PASSWORDS: ({commit}) => {
if (auth.isAuthenticated()) {
PasswordsAPI.all().then(response => commit('SET_PASSWORDS', response.data.results));
@@ -146,9 +139,6 @@ const actions = {
PasswordsAPI.remove({id}).then(() => {
commit('DELETE_PASSWORD', {id});
});
},
LOAD_DEFAULT_PASSWORD: ({commit}) => {
commit('SET_DEFAULT_PASSWORD');
}
};



+ 0
- 0
src/store/mutations.js Ver fichero


+ 3
- 0
test/store.js Ver fichero

@@ -0,0 +1,3 @@
/**
* Created by guillaume on 13/12/16.
*/

Cargando…
Cancelar
Guardar