Skip to content

armgit / meet

Public Imported from GitHub
0

Open source video conferencing app powered by LiveKit. Built with Django and React.

🐛(frontend) stop passing username as a query param when undefined

lebaudantoinec23f44952052
diff --git a/src/frontend/src/features/rooms/api/fetchRoom.ts b/src/frontend/src/features/rooms/api/fetchRoom.ts
index 4c014d27..bdbd1085 100644
--- a/src/frontend/src/features/rooms/api/fetchRoom.ts
+++ b/src/frontend/src/features/rooms/api/fetchRoom.ts
@@ -3,12 +3,12 @@ import { fetchApi } from '@/api/fetchApi'
export const fetchRoom = ({
roomId,
- username = '',
+ username,
}: {
roomId: string
username?: string
}) => {
- return fetchApi<ApiRoom>(
- `/rooms/${roomId}?username=${encodeURIComponent(username)}`
- )
+ const query = username ? `?username=${encodeURIComponent(username)}` : ''
+
+ return fetchApi<ApiRoom>(`/rooms/${roomId}${query}`)
}