🚀 feat(chatComponent): update API endpoint for build stream

🚀 feat(vite.config.ts): add new API route for build stream
The API endpoint for the build stream has been updated to `/api/v1/build/stream/${flowId}` to improve consistency with the naming conventions. The `vite.config.ts` file has been updated to include the new API route for the build stream.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-13 19:42:30 -03:00
commit af8afea421
2 changed files with 2 additions and 1 deletions

View file

@ -58,7 +58,7 @@ export default function BuildTrigger({
// Step 2: Use the session ID to establish an SSE connection using EventSource
let validationResults = [];
let finished = false;
const apiUrl = `/build/stream/${flowId}`;
const apiUrl = `/api/v1/build/stream/${flowId}`;
const eventSource = new EventSource(apiUrl);
eventSource.onmessage = (event) => {

View file

@ -7,6 +7,7 @@ const apiRoutes = [
"^/api/v1/validate/*",
"/api/v1/chat/*",
"/api/v1/version",
"^/api/v1/build/*",
"/health",
];