add production values

This commit is contained in:
Blake Ridgway
2025-11-29 13:26:19 -06:00
parent 58b011decb
commit 579657da1f

View File

@@ -1,7 +1,11 @@
import axios from 'axios' import axios from 'axios'
const API_BASE_URL = process.env.NODE_ENV === 'production'
? 'http://127.0.0.1:5010'
: 'http://127.0.0.1:5000'
const api = axios.create({ const api = axios.create({
baseURL: 'http://127.0.0.1:5000', baseURL: API_BASE_URL,
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
}, },
@@ -34,7 +38,11 @@ api.interceptors.response.use(
throw new Error('No refresh token') throw new Error('No refresh token')
} }
const { data } = await axios.post('http://127.0.0.1:5000/api/refresh-token', { const refreshUrl = process.env.NODE_ENV === 'production'
? 'http://127.0.0.1:5010/api/refresh-token'
: 'http://127.0.0.1:5000/api/refresh-token'
const { data } = await axios.post(refreshUrl, {
refresh_token: refreshToken refresh_token: refreshToken
}) })