fix query string construction when fetching user latencies
This commit is contained in:
parent
64c42b5de3
commit
b0672a9cb3
|
|
@ -148,7 +148,8 @@ export const getSessions = () => {
|
|||
|
||||
export const getLatencyToUsers = (currentUserId, participantIds) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
apiFetch(`/users/${currentUserId}/latencies?user_ids[]=${participantIds}`)
|
||||
const query = participantIds.map(id => `user_ids[]=${id}`).join('&')
|
||||
apiFetch(`/users/${currentUserId}/latencies?${query}`)
|
||||
.then(response => resolve(response))
|
||||
.catch(error => reject(error))
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue