aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/api
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2024-02-14 16:21:06 +0300
committerGravatar Vitaly Takmazov2024-02-18 18:08:07 +0300
commit09f83f8f6c6c1021d7709be799c1d2c5b3bf3016 (patch)
treef98097e45cbbd64e74dc47b50c2bd156810b4f73 /vnext/src/api
parentc9c500a07d58fbbbe8bfd1cbc326140872ccc785 (diff)
vnext: configure devserver proxy
Diffstat (limited to 'vnext/src/api')
-rw-r--r--vnext/src/api/index.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/vnext/src/api/index.js b/vnext/src/api/index.js
index 095e18b8..7d878864 100644
--- a/vnext/src/api/index.js
+++ b/vnext/src/api/index.js
@@ -1,7 +1,5 @@
import axios from 'axios'
-const apiBaseUrl = 'https://beta.juick.com'
-
/**
* @typedef {object} Token
* @property {string} type
@@ -70,9 +68,7 @@ const apiBaseUrl = 'https://beta.juick.com'
*/
-const client = axios.create({
- baseURL: apiBaseUrl
-})
+const client = axios.create({ baseURL: '' })
/**
* fetch my info
@@ -181,7 +177,7 @@ export function updateAvatar(newAvatar) {
* @param {string} network
*/
function socialLink(network) {
- return `${apiBaseUrl}/api/_${network}login?state=${window.location.protocol}//${window.location.host}${window.location.pathname}`
+ return `/api/_${network}login?state=${window.location.protocol}//${window.location.host}${window.location.pathname}`
}
/**
@@ -210,7 +206,7 @@ export function appleLink() {
* @param {SecureUser} visitor
*/
export function markReadTracker(msg, visitor) {
- return `${apiBaseUrl}/api/thread/mark_read/${msg.mid}-${msg.rid || 0}.gif?hash=${visitor.hash}`
+ return `/api/thread/mark_read/${msg.mid}-${msg.rid || 0}.gif?hash=${visitor.hash}`
}
let profileCache = {}