🐛 fix(frontend): add missing api/v1 prefix to API routes

🐛 fix(frontend): add missing api/v1 prefix to WebSocket URL
🐛 fix(frontend): add missing api/v1 prefix to Vite proxy target
The API routes, WebSocket URL, and Vite proxy target were missing the "api/v1" prefix, causing the frontend to not be able to communicate with the backend. This commit adds the missing prefix to all three locations to fix the issue.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-06 10:06:14 -03:00
commit 478bb446c3
3 changed files with 5 additions and 5 deletions

View file

@ -11,7 +11,7 @@ const apiRoutes = [
];
// Use environment variable to determine the target.
const target = process.env.VITE_PROXY_TARGET || "http://127.0.0.1:7860";
const target = process.env.VITE_PROXY_TARGET || "http://127.0.0.1:7860/api/v1";
const proxyTargets = apiRoutes.reduce((proxyObj, route) => {
proxyObj[route] = {