|
|
@@ -6,6 +6,10 @@ export default class {
|
|
|
}
|
|
|
|
|
|
lol(username, password) {
|
|
|
+ //TODO: return promise somehow
|
|
|
+ //alert('Login attempt as user \'' + username + '\' with password \'' + password + '\'')
|
|
|
+
|
|
|
+ /*
|
|
|
axios.get('https://live.ecconia.de/soos')
|
|
|
.then(function (response) {
|
|
|
console.log('Response: ', response.data)
|
|
|
@@ -13,5 +17,17 @@ export default class {
|
|
|
.catch(function (error) {
|
|
|
console.error('Error: ', error)
|
|
|
})
|
|
|
+ */
|
|
|
+
|
|
|
+ axios.post('https://live.ecconia.de/login', {
|
|
|
+ username: username,
|
|
|
+ password: password,
|
|
|
+ }).then((response) => {
|
|
|
+ console.log('Response: ', response.data)
|
|
|
+ this.vuex.commit('setUser', response.data)
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ console.error('Error: ', error)
|
|
|
+ })
|
|
|
}
|
|
|
}
|