diff --git a/xroom-dashboard/src/api/axios.js b/xroom-dashboard/src/api/axios.js new file mode 100644 index 0000000..e4d6ab3 --- /dev/null +++ b/xroom-dashboard/src/api/axios.js @@ -0,0 +1,12 @@ +// src/api/axios.js +import axios from 'axios'; +import { API_BASE_URL } from '@/config'; // Adjust the path if needed + +const apiClient = axios.create({ + baseURL: API_BASE_URL, // All requests will prepend this URL + headers: { + 'Content-Type': 'application/json', + }, +}); + +export default apiClient; \ No newline at end of file diff --git a/xroom-dashboard/src/config/index.js b/xroom-dashboard/src/config/index.js new file mode 100644 index 0000000..693ecf6 --- /dev/null +++ b/xroom-dashboard/src/config/index.js @@ -0,0 +1,2 @@ +// src/config/index.js +export const API_BASE_URL = 'http://194.62.43.230:8000'; \ No newline at end of file diff --git a/xroom-dashboard/src/pages/LoginPage.vue b/xroom-dashboard/src/pages/LoginPage.vue index d5fa801..871ee8c 100644 --- a/xroom-dashboard/src/pages/LoginPage.vue +++ b/xroom-dashboard/src/pages/LoginPage.vue @@ -2,7 +2,7 @@