From e8c9ea0994a4211f5a6ac64e81a60bc348a4a837 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 24 Feb 2021 22:53:58 +0100 Subject: [PATCH] started loginAPI mixin --- frontend/src/mixins/loginAPI.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 frontend/src/mixins/loginAPI.js 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