mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-06 17:07:46 +00:00
🐛(frontend) stop passing username as a query param when undefined
Skip adding the username query parameter when its value is undefined, so the request URL no longer ends up with an `?username=undefined` (or similar) that the backend has to handle.
This commit is contained in:
committed by
aleb_the_flash
parent
0536896373
commit
c23f449520
@@ -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}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user