started loginAPI mixin

This commit is contained in:
Ulf Gebhardt 2021-02-24 22:53:58 +01:00
parent ff1dbeadaa
commit e8c9ea0994
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD

View File

@ -0,0 +1,19 @@
// TODO move this
const LOGIN_API_URL = 'http://localhost/login_api/'
// define a mixin object
const loginAPI = {
mutations: {
login: async () => {
return axios.post(LOGIN_API_URL + 'unsecureLogin', data);
},
creatUser : async () => {
return axios.post(LOGIN_API_URL + 'createUser', data);
},
logout: async () => {
return axios.post(LOGIN_API_URL + 'logout', data);
},
}
}
export default loginAPI