Skip to content

Commit

Permalink
Fix url bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocupe committed Sep 12, 2024
1 parent b1544a8 commit e4593f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion frontend/app/connection-details/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ export async function GET() {
"roomName"
);

if (LIVEKIT_SERVER_URL === undefined) {
throw new Error("LIVEKIT_SERVER_URL is not defined");
}

// Return connection details
const data = {
const data: ConnectionDetails = {
serverUrl: LIVEKIT_SERVER_URL,
roomName: "voice_assistant_room",
participantToken: participantToken,
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function Page() {

const onConnectButtonClicked = useCallback(async () => {
const url = new URL(
process.env.NEXT_PUBLIC_CONN_DETAILS_ENDPOINT ?? "connection-details",
process.env.NEXT_PUBLIC_CONN_DETAILS_ENDPOINT ?? "/connection-details",
window.location.origin
);
const response = await fetch(url.toString());
Expand Down

0 comments on commit e4593f7

Please sign in to comment.