From 04a6acca6121a92aa5936149dffc37e9830b7df9 Mon Sep 17 00:00:00 2001 From: Faris Isa Date: Sun, 2 May 2021 14:52:32 +0700 Subject: [PATCH] move axios to api folder --- src/api/axios.js | 9 +++++++++ src/axios.js | 10 ---------- 2 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 src/api/axios.js delete mode 100644 src/axios.js diff --git a/src/api/axios.js b/src/api/axios.js new file mode 100644 index 0000000..d8c447d --- /dev/null +++ b/src/api/axios.js @@ -0,0 +1,9 @@ +import axios from 'axios'; + +let api = axios.create({ + baseURL: "http://localhost/backend/api", + // baseURL: "https://m3117063.api.isabot.site/api", + withCredentials: true, +}); + +export default api; diff --git a/src/axios.js b/src/axios.js deleted file mode 100644 index 22b961a..0000000 --- a/src/axios.js +++ /dev/null @@ -1,10 +0,0 @@ -import axios from 'axios'; - -const instance = axios.create({ - // baseURL: "http://127.0.0.1/backend/api", - baseURL: "https://m3117063.api.isabot.site/api", -}); - -instance.defaults.headers.common['Authorization'] = "" - -export default instance;