Commit 12271a98 authored by Adrian's avatar Adrian
Browse files

implementando el logout

parent 5675f1d9
import axios from 'axios';
export default { export default {
methods: { methods: {
getModules(roles, rol = null) { getModules(roles, rol = null) {
...@@ -82,6 +84,15 @@ export default { ...@@ -82,6 +84,15 @@ export default {
store.commit('setDefault'); store.commit('setDefault');
}, },
async logout(router, store) { 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; const storevuex = store || this.$store;
router = router || this.$router; router = router || this.$router;
this.$storage.removeUser(); 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