|
@@ -91,13 +91,13 @@ export default {
|
91
|
91
|
},
|
92
|
92
|
methods: {
|
93
|
93
|
Login() {
|
94
|
|
- console.log(this.username + this.password);
|
95
|
94
|
axios
|
96
|
|
- .post('http://localhost:57260/api/register/authenticate', {
|
|
95
|
+ .post('/api/register/authenticate', {
|
97
|
96
|
username: this.username,
|
98
|
97
|
password: this.password,
|
99
|
98
|
})
|
100
|
|
- .then(response => console.log(response.data));
|
|
99
|
+ .then(response => console.log(response.data))
|
|
100
|
+ .catch(error => console.log(error.push));
|
101
|
101
|
this.$router.push('/');
|
102
|
102
|
},
|
103
|
103
|
togglePassword() {
|
|
@@ -108,14 +108,6 @@ export default {
|
108
|
108
|
this.showPassword = false;
|
109
|
109
|
this.isPasswordShown = 'password';
|
110
|
110
|
},
|
111
|
|
- authHeader() {
|
112
|
|
- const user = JSON.parse(localStorage.getItem('user'));
|
113
|
|
-
|
114
|
|
- if (user && user.token) {
|
115
|
|
- return { Authoriztion: `Bearer ${user.token}` };
|
116
|
|
- }
|
117
|
|
- return {};
|
118
|
|
- },
|
119
|
111
|
SendMail() {},
|
120
|
112
|
},
|
121
|
113
|
};
|