diff --git a/frontend/src/mixins/loginAPI.js b/frontend/src/mixins/loginAPI.js new file mode 100644 index 000000000..69c5e1441 --- /dev/null +++ b/frontend/src/mixins/loginAPI.js @@ -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 \ No newline at end of file