MCPcopy
hub / github.com/QuantumNous/new-api / updateAPI

Function updateAPI

web/src/helpers/api.js:83–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81patchAPIInstance(API);
82
83export function updateAPI() {
84 API = axios.create({
85 baseURL: import.meta.env.VITE_REACT_APP_SERVER_URL
86 ? import.meta.env.VITE_REACT_APP_SERVER_URL
87 : '',
88 headers: {
89 'New-API-User': getUserIdFromLocalStorage(),
90 'Cache-Control': 'no-store',
91 },
92 });
93
94 patchAPIInstance(API);
95}
96
97API.interceptors.response.use(
98 (response) => response,

Callers 9

sendCodeFunction · 0.90
onTelegramLoginClickedFunction · 0.90
handleSubmitFunction · 0.90
onTelegramLoginClickedFunction · 0.90
handlePasskeyLoginFunction · 0.90
handle2FASuccessFunction · 0.90
prepareOAuthStateFunction · 0.85

Calls 2

patchAPIInstanceFunction · 0.85

Tested by

no test coverage detected