Skip to content

Commit

Permalink
fix login
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam Cabra Teixeira committed Oct 1, 2020
1 parent f28b217 commit 034a6bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/store/modules/ProfileVuex.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default {
async getUser(context){
const token = localStorage.getItem('token');
const decodedToken = await axios.post(process.env.VUE_APP_BASE_URL+'/user/authToken', token);

console.log(decodedToken)
const user = await axios.get(process.env.VUE_APP_BASE_URL+`/user/mail/${decodedToken.data}`);

return user.data;
Expand Down
6 changes: 5 additions & 1 deletion src/views/public/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ export default {
position: "topCenter"
})
localStorage.token = isAuth.data
// localStorage.token = isAuth.data[0]
const token = isAuth.data[0];
localStorage.token = isAuth.data[0];
this.$router.push('/Feed')
}
Expand Down

0 comments on commit 034a6bc

Please sign in to comment.