fix missing station id on connect & server api call
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { serverApi } from "helpers/axios";
|
||||
import {
|
||||
handleActiveSpeakerChange,
|
||||
handleDisconnect,
|
||||
@@ -23,8 +24,8 @@ type TalkState = {
|
||||
room: Room | null;
|
||||
};
|
||||
const getToken = async (roomName: string) => {
|
||||
const response = await fetch(`/api/livekit/token?roomName=${roomName}`);
|
||||
const data = await response.json();
|
||||
const response = await serverApi.get(`/livekit/token?roomName=${roomName}`);
|
||||
const data = response.data;
|
||||
return data.token;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user