frontend api fix
This commit is contained in:
@@ -27,7 +27,9 @@ const runtimeApiBase =
|
||||
? window.__PAPERCRATE_API_BASE_URL
|
||||
: '';
|
||||
|
||||
const API_ROOT = (runtimeApiBase || process.env.API_BASE_URL || '').replace(/\/$/, '');
|
||||
const DEFAULT_DEV_API = 'http://127.0.0.1:3000';
|
||||
|
||||
const API_ROOT = (runtimeApiBase || process.env.API_BASE_URL || DEFAULT_DEV_API).replace(/\/$/, '');
|
||||
|
||||
const api = axios.create({
|
||||
baseURL: API_ROOT ? `${API_ROOT}/api` : '/api',
|
||||
|
||||
Reference in New Issue
Block a user