Skip to content
Snippets Groups Projects
Commit f740bad9 authored by Lucendio's avatar Lucendio
Browse files

[app] Rename and move var that used to set API URL

* PUBLIC_URL should now be provided as env var
parent 794944c0
No related branches found
No related tags found
No related merge requests found
REACT_APP_baseAPIURL=http://localhost:3000
import axios from 'axios'
const axiosInstance = axios.create({
baseURL: process.env.REACT_APP_baseAPIURL,
baseURL: process.env.PUBLIC_URL,
withCredentials: true,
});
......@@ -16,7 +16,7 @@ axiosInstance.interceptors.response.use(
);
export const signout = () => {
return axiosInstance.post(process.env.REACT_APP_baseAPIURL + '/logout').then(user => {
return axiosInstance.post(process.env.PUBLIC_URL + '/logout').then(user => {
// delete axiosInstance.defaults.headers.common["Authorization"];
return user.data
})
......@@ -93,4 +93,4 @@ export const deleteTodo = (_id) => {
}).then(todo => {
return todo
})
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment