Commit 12271a98 authored by Adrian's avatar Adrian

implementando el logout

parent 5675f1d9
import axios from 'axios';
export default {
methods: {
getModules(roles, rol = null) {
......@@ -82,6 +84,15 @@ export default {
store.commit('setDefault');
},
async logout(router, store) {
const request = {
url: `${this.$baseServer}logout`,
method: 'GET',
headers: {
Authorization: `Bearer ${this.$storage.get('token')}`
}
};
const response = await axios(request);
console.log(response);
const storevuex = store || this.$store;
router = router || this.$router;
this.$storage.removeUser();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment