Skip to content

Commit

Permalink
Fix call.get signature
Browse files Browse the repository at this point in the history
  • Loading branch information
szuperaz committed Nov 10, 2023
1 parent 6c00abc commit 9120066
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions __tests__/call.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe("call API", () => {
});

it("RTMP address", async () => {
const resp = await call.getOrCreate();
const resp = await call.get();

// userId of existing user
const userId = "jane";
Expand All @@ -77,10 +77,10 @@ describe("call API", () => {
},
});
const token = client.createToken(userId);
const address = resp.call.ingress.rtmp.address;
const streamKey = `${apiKey}/${token}`;
const rtmpURL = resp.call.ingress.rtmp.address;
const streamKey = token;

expect(address).toBeDefined();
expect(rtmpURL).toBeDefined();
expect(streamKey).toBeDefined();
});

Expand Down
4 changes: 2 additions & 2 deletions src/StreamCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ export class StreamCall {
return this.apiClient.endCall({ ...this.baseRequest });
};

get = (request: OmitTypeId<GetCallRequest>) => {
return this.apiClient.getCall({ ...request, ...this.baseRequest });
get = (request?: OmitTypeId<GetCallRequest>) => {
return this.apiClient.getCall({ ...(request || {}), ...this.baseRequest });
};

getOrCreate = (videoGetOrCreateCallRequest?: VideoGetOrCreateCallRequest) => {
Expand Down

0 comments on commit 9120066

Please sign in to comment.