chore: Adjust Chatwoot Config to deploy frontend as a separate app (#2347)

This commit is contained in:
Pranav Raj S 2021-05-28 19:21:16 +05:30 committed by GitHub
parent 3b39eb3e33
commit 25ba852b68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 53 additions and 60 deletions

View file

@ -1,14 +1,11 @@
/* eslint no-console: 0 */
import constants from '../constants';
import Auth from '../api/auth';
const parseErrorCode = error => {
return Promise.reject(error);
};
const parseErrorCode = error => Promise.reject(error);
export default axios => {
const wootApi = axios.create();
wootApi.defaults.baseURL = constants.apiURL;
const { apiHost = '' } = window.chatwootConfig || {};
const wootApi = axios.create({ baseURL: `${apiHost}/` });
// Add Auth Headers to requests if logged in
if (Auth.isLoggedIn()) {
const {