Added login to the application to make authenticated api requests.

This commit is contained in:
krzysiej
2022-06-20 15:05:27 +02:00
parent 4536195a4c
commit 00bb86f798
13 changed files with 230 additions and 9 deletions

13
assets/js/api/user.js Normal file
View File

@@ -0,0 +1,13 @@
import axios from 'axios';
export default {
login: function (email, password) {
return axios.post('/login_api', {
email: email,
password: password
});
},
getUserData: function (userIri) {
return axios.get(userIri);
},
}