api.video-nodejs-client icon indicating copy to clipboard operation
api.video-nodejs-client copied to clipboard

[Bug]: Can't list my livestreams with nodejs client package

Open lyorb opened this issue 1 year ago • 0 comments

Version

2.5.6

Environment that reproduces the issue

Windows 11, ElysiaJS with bun

Is it reproducible in the example application?

Yes

Reproduction steps

return app
      .post(
        "/list",
        async ({ body }: { body: LiveStreamListPayload }) => {          
          const liveStreams = await client.liveStreams.list({
            streamKey: body.streamKey,
            name: body.name,
            sortBy: body.sortBy,
            sortOrder: body.sortOrder,
            currentPage: body.currentPage,
            pageSize: body.pageSize,
          });
          return { data: liveStreams };
        },
        {
          body: t.Object({
            streamKey: t.Optional(t.String()),
            name: t.Optional(t.String()),
            sortBy: t.Optional(t.String()),
            sortOrder: t.Optional(t.String()),
            currentPage: t.Optional(t.Number()),
            pageSize: t.Optional(t.Number()),
          }),
        }
      )

Expected result

The list of my livestreams

Actual result

{
  "name": "Error",
  "message": "ApiVideoError"
}

Additional context

No response

Relevant logs output

No response

lyorb avatar Apr 21 '24 13:04 lyorb